login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A287798
Least k such that A006667(k)/A006577(k) = 1/n.
2
159, 6, 5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920, 163840, 327680, 655360, 1310720, 2621440, 5242880, 10485760, 20971520, 41943040, 83886080, 167772160, 335544320, 671088640, 1342177280, 2684354560, 5368709120, 10737418240
OFFSET
3,1
COMMENTS
A006667: number of tripling steps to reach 1 in '3x+1' problem.
A006577: number of halving and tripling steps to reach 1 in '3x+1' problem.
a(n) = {159, 6} union {A020714}.
FORMULA
For n >= 5, a(n) = 5*2^n/32. - David A. Corneth, Jun 01 2017
From Colin Barker, Jun 01 2017: (Start)
G.f.: x^3*(159 - 312*x - 7*x^2) / (1 - 2*x).
a(n) = 2*a(n-1) for n>5.
(End)
EXAMPLE
a(3) = 159 because A006667(159)/A006577(159) = 18/54 = 1/3.
MAPLE
nn:=10^12:
for n from 3 to 35 do:
ii:=0:
for k from 2 to 10^6 while(ii=0) do:
m:=k:s1:=0:s2:=0:
for i from 1 to nn while(m<>1) do:
if irem(m, 2)=0
then
s2:=s2+1:m:=m/2:
else
s1:=s1+1:m:=3*m+1:
fi:
od:
if n*s1=s1+s2
then
ii:=1: printf(`%d, `, k):
else
fi:
od:od:
MATHEMATICA
f[u_]:=Module[{a=u, k=0}, While[a!=1, k++; If[EvenQ[a], a=a/2, a=a*3+1]]; k]; Table[f[u], {u, 10^7}]; g[v_]:=Count[Differences[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, v, #>1&]], _?Positive]; Table[g[v], {v, 10^7}]; Do[k=3; While[g[k]/f[k]!=1/n, k++]; Print[n, " ", k], {n, 3, 35}]
PROG
(PARI) a(n) = if(n < 5, [0, 0, 159, 6][n], 5<<(n-5)) \\ David A. Corneth, Jun 01 2017
(PARI) Vec(x^3*(159 - 312*x - 7*x^2) / (1 - 2*x) + O(x^50)) \\ Colin Barker, Jun 01 2017
CROSSREFS
Cf. A006577, A006666, A006667. Essentially the same as A020714, A084215, A146523 and A257113.
Sequence in context: A252359 A159418 A159434 * A303811 A207146 A045260
KEYWORD
nonn,easy
AUTHOR
Michel Lagneau, Jun 01 2017
STATUS
approved