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, 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
Keywords
Examples
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.
Links
- Dmitry Kamenetsky, Table of n, a(n) for n = 0..237
- Dmitry Kamenetsky, Smallest m>1 such that the number of Collatz steps needed for 238!+m to reach 1 differs from that of 238!+1., Mathematics StackExchange, Aug 2021.
- Index entries for sequences related to 3x+1 (or Collatz) problem
Programs
-
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 *)
-
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
Comments