|
|
A277684
|
|
Least k such that A277109(k) = 2^n - 1.
|
|
2
|
|
|
0, 6, 17, 18, 69, 70, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 464, 465, 466, 467, 624, 625, 1810, 1811, 1812
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Are the terms always increasing? Note, if the conjecture in A277109 is true then the terms in this sequence are guaranteed to be increasing.
|
|
LINKS
|
|
|
EXAMPLE
|
|
|
MATHEMATICA
|
collatzN[n_] := Length[NestWhileList[If[EvenQ[#], #/2, 3# + 1]&, n, #!=1&]]
collatzNrun[n_] := Module[{run=collatzN[n], k=1}, While[collatzN[n+k]==run, k++]; k]
power2[k_] := Module[{list=NestWhileList[#/2&, k, EvenQ]}, {Last[list], Length[list]-1}]
(* a277684[] computes all values through index n *)
a277684[n_] := Module[{i, list={0}}, For[i=1, i<=n, i++, If[power2[collatzNrun[2^i+1]+1] == {1, Length[list]+1}, AppendTo[list, i]]]; list]/; n>0 (* Hartmut F. W. Hoft, Aug 16 2018 *)
|
|
PROG
|
(PARI) nbsteps(n)= s=n; c=0; while(s>1, s=if(s%2, 3*s+1, s/2); c++); c;
len(n) = {my(ns = 2^n+1); my(nbs = nbsteps(ns)); while(nbsteps(ns+1) == nbs, ns++); ns - 2^n; }
a(n) = {k=0; while(len(k) != 2^n-1, k++); k; } \\ Michel Marcus, Oct 30 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|