|
|
|
|
2, 6, 12, 3, 34, 49, 9, 72, 98, 18, 25, 28, 33, 39, 36, 7, 57, 406, 65, 11, 72, 86, 98, 114, 114, 129, 913, 153, 153, 171, 27, 172, 203, 33, 39, 270, 270, 295, 270, 290, 290, 305, 361, 57, 57, 386, 73, 78, 481, 481, 78, 72, 514, 20174, 609, 641, 641, 641, 641
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
A006577(n) is the number of halving and tripling steps to reach 1 in the '3x+1' problem.
The distinct squares in the sequence are 9, 25, 36, 49, 169, 361, ...
The distinct primes in the sequence are 2, 3, 7, 11, 31, 41, 47, 71, 73, 97, 103, ...
|
|
LINKS
|
|
|
EXAMPLE
|
|
|
MAPLE
|
nn:=3*10^6:U:=array(1..nn):V:=array(1..nn):
for i from 1 to nn do:
m:=i:it0:=0:
for j from 1 to nn while(m<>1) do:
if irem(m, 2)=0
then
m:=m/2:it0:=it0+1:
else
m:=3*m+1:it0:=it0+1:
fi:
od:
U[i]:=it0:
od:
for n from 1 to 60 do:
ii:=0:
for k from 1 to nn while(ii=0) do:
if U[k]=U[n]+ U[n+1]
then
ii:=1:printf(`%d, `, k):
else
fi:
od:
od:
|
|
MATHEMATICA
|
f:=Table[Length[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #!=1&]]-1, {n, 3*10^6}]; Do[k=1; While[f[[k]]!=f[[m]]+f[[m+1]], k++]; Print[m, " ", k], {m, 1, 60}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|