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.

A277109 Starting from 2^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, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 7, 15, 30, 1, 1, 3, 7, 15, 26, 26, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 7, 15, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 7, 15, 1, 1, 3, 7, 15, 26, 1, 3, 7, 15, 31, 63, 26, 30, 26, 26, 26, 26, 30, 46, 26, 26, 26, 26, 1, 1, 1, 3, 7, 15, 1, 3, 1
Offset: 0

Views

Author

Dmitry Kamenetsky, Sep 30 2016

Keywords

Comments

a(500) was found by Guo-Gang Gao (see links).
Interestingly, this sequence has many sets of consecutive terms that are increasing powers of 2 minus 1. For example: a(291) to a(307), a(447) to a(467), and a(603) to a(625). It is not clear why this is the case.
The largest value known in this sequence is a(1812) = 2^26-1 = 67108863.
Conjecture: If a(n) = 2^k - 1 for some k > 1, then a(n-1) = 2^(k-1) - 1. Conjecture holds for n <= 1812.
From Hartmut F. W. Hoft, Aug 16 2018: (Start)
The conjecture is true. Let the lengths of the Collatz runs equal q for all numbers 2^n + 1, 2^n + 2, 2^n + 3, 2^n + 4, ..., 2^n + 2^k - 2, 2^n + 2^k - 1. Then dividing the 2^(k-1) - 1 even numbers by two gives rise to the sequence 2^(n-1) + 1, 2^(n-1) + 2, ..., 2^(n-1) + 2^(k-1) - 1 of numbers for which the lengths of the Collatz runs equals q-1. Furthermore, let the length of the Collatz run of 2^n + 2^k be r != q then the length of the Collatz run of 2^(n-1) + 2^(k-1) is r-1 != q-1, i.e., a(n-1) = 2^(k-1) - 1.
Conjecture: Let a(k), ..., a(k+m), m >= 0, be a subsequence of this sequence such that a(k)=a(k+m+1)=1 and a(k+i) > 1, 1 <= i <= m. Then the lengths of the Collatz runs of a(k+i), 0 <= i <= m, increase by 1. In addition, there is an initial segment of increasing numbers a(k), ..., a(k+j), for some 0 <= j <= m, in each such subsequence having the form 2^i - 1, 0 < i <= j. (End)

Examples

			a(6) = 3, because 2^6+1, 2^6+2 and 2^6+3 all take 27 steps to reach 1.
From _Hartmut F. W. Hoft_, Aug 16 2018: (Start)
Two examples for the conjecture (L(n) denotes the length of the Collatz run):
n      a(n)    L(n)          n      a(n)    L(n)
64     26      483           20      1       72
------------------           ------------------
65      1      559           21      1      166
66      3      560           22      3      167
67      7      561           23      7      168
68     15      562           24     15      169
69     31      563           ------------------
70     63      564           25     26      170
------------------           26     26      171
71     26      565           ------------------
72     30      566           27      1      247
73     26      567
74     26      568
75     26      569
76     26      570
77     30      571
78     46      572
79     26      573
80     26      574
81     26      575
82     26      576
------------------
83      1      626
The "power of 2 minus 1" initial section of any such subsequence of a(n) is always increasing. However, there is no apparent ordering in the second section when that is present. (End)
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # != 1 &]] - 1; Table[k = 1; While[f[2^n + k] == f[2^n + k + 1], k++]; k, {n, 120}] (* Michael De Vlieger, Oct 03 2016 *)
  • PARI
    nbsteps(n)= s=n; c=0; while(s>1, s=if(s%2, 3*s+1, s/2); c++); c;
    a(n) = {my(ns = 2^n+1); my(nbs = nbsteps(ns)); while(nbsteps(ns+1) == nbs, ns++); ns - 2^n;} \\ Michel Marcus, Oct 30 2016