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”).

A346775
Starting from n!+1, the length of the longest sequence of consecutive numbers which all take the same number of steps to reach 1 in the Collatz (or '3x+1') problem.
1
1, 1, 1, 1, 1, 1, 3, 5, 1, 7, 1, 1, 3, 1, 3, 1, 1, 1, 30, 1, 30, 3, 7, 1, 3, 3, 7, 1, 1, 7, 15, 3, 1, 1, 3, 15, 26, 15, 1, 1, 1, 1, 7, 7, 26, 7, 1, 7, 3, 1, 1, 3, 1, 7, 3, 7, 1, 1, 26, 15, 7, 30, 1, 1, 1, 1, 3, 15, 3, 1, 1, 31, 648, 26, 26, 30, 90, 1, 1, 3, 15
OFFSET
0,7
COMMENTS
The largest value known in this sequence is a(219)=78553595.
2^32 < a(238) < 11442739136455298475. - Martin Ehrenstein, Aug 21 2021
Jeremy Sawicki found that a(238) = 107150589645. - Dmitry Kamenetsky, Aug 25 2024
EXAMPLE
a(6) = 3, because 6!+1, 6!+2 and 6!+3 all take 46 steps to reach 1, while 6!+4 requires 20 steps to reach 1.
MATHEMATICA
f[n_] := Length[NestWhileList[If[EvenQ@#, #/2, 3 # + 1] &, n, # != 1 &]] - 1; Table[k = 1; While[f[n! + k] == f[n! + k + 1], k++]; k, {n, 0, 100}] (* Bence Bernáth, Aug 14 2021 *)
PROG
(PARI) a6577(n0)={my(n=n0, k=0); while(n>1, k++; n=if(n%2, 3*n+1, n/2)); k};
for(n=0, 80, my(n0=n!+1, nc=a6577(n0), k=1); while(a6577(n0++)==nc, k++); print1(k, ", ")) \\ Hugo Pfoertner, Aug 04 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Dmitry Kamenetsky, Aug 03 2021
STATUS
approved