cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Dmitry Kamenetsky, Aug 03 2021

Keywords

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

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.
		

Crossrefs

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