|
Search: id:A078440
|
|
|
| A078440 |
|
Numbers n with property that n is not a power of 2 and the finite sequence n, f(n), f(f(n)), ...., 1 in the Collatz (or 3x + 1) problem contains exactly one prime. (The earliest "1" is meant.) |
|
+0 1
|
|
| 21, 42, 84, 85, 168, 170, 336, 340, 341, 453, 672, 680, 682, 906, 909, 1344, 1360, 1364, 1365, 1812, 1813, 1818, 2688, 2720, 2728, 2730, 3624, 3626, 3636, 5376, 5440, 5456, 5460, 5461, 7248, 7252, 7272, 7281, 9669
(list; graph; listen)
|
|
|
OFFSET
|
1,1
|
|
|
COMMENT
|
f(n) = n/2 if n is even, = 3n + 1 if n is odd. Powers 2^n trivially have exactly one prime in n, f(n), f(f(n)), ..., 2, 1, namely 2 and so are excluded from the sequence.
|
|
EXAMPLE
|
n, f(n), f(f(n)), .... for n = 21 is: 21, 64, 32, 16, 8, 4, 2, 1, which has exactly one prime, that is, 2. Hence 21 belongs to the sequence.
|
|
MATHEMATICA
|
f[n_] := n/2 /; Mod[n, 2] == 0 f[n_] := 3 n + 1 /; Mod[n, 2] == 1 g[n_] := Module[{i, p}, i = n; p = 0; While[i > 1, If[PrimeQ[i], p = p + 1]; i = f[i]]; p]; Select[Range[10^4], g[ # ] == 1 && ! IntegerQ[Log[2, # ]] &]
|
|
CROSSREFS
|
Sequence in context: A008603 A086794 A001682 this_sequence A039344 A043167 A043947
Adjacent sequences: A078437 A078438 A078439 this_sequence A078441 A078442 A078443
|
|
KEYWORD
|
more,nonn
|
|
AUTHOR
|
Joseph L. Pe (joseph_l_pe(AT)hotmail.com), Dec 31 2002
|
|
|
Search completed in 0.002 seconds
|