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.

Showing 1-6 of 6 results.

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(3951) = 2^47-1 = 140737488355327.
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

A268253 a(n) begins the first chain of 5 consecutive positive integers of h-values with symmetrical gaps about the center, where h(k) is the length of the finite sequence k, f(k), f(f(k)), ..., 1 in the Collatz (or 3x + 1) problem.

Original entry on oeis.org

98, 130, 290, 354, 386, 387, 418, 507, 514, 610, 628, 802, 840, 841, 866, 943, 944, 945, 1003, 1121, 1122, 1154, 1172, 1186, 1272, 1314, 1378, 1442, 1494, 1495, 1496, 1497, 1538, 1634, 1680, 1681, 1682, 1683, 1684, 1698, 1699, 1826, 1890, 1922, 1923, 1991, 1992
Offset: 1

Views

Author

Michel Lagneau, Jan 29 2016

Keywords

Comments

a(1) = A078441(5).
Or numbers k such that h(k) + h(k+4) = h(k+1) + h(k+3) and h(k+2) = (h(k) + h(k+4))/2, where h(k) is the length of k, f(k), f(f(k)), ..., 1 in the Collatz (or 3x + 1) problem.
The 5-tuple of consecutive h(k) are symmetric about the central value h(k+2) which are averages of both their immediate neighbors and their second neighbors.
A majority of numbers generate trivial 5-tuples {m, m, m, m, m}.
The 5-tuples {h(k)} of the form {m, p, p, p, q} are generated by the numbers of the sequence 507, 1003, ...
The 5-tuples {h(k)} of the form {m, p, m, q, m} are generated by the numbers of the sequence 1272, 3672, ...

Examples

			In 5-tuple of consecutive {h(k)}: {h(1272),h(1273),h(1274),h(1275),h(1276)} = {57,31,57,83,57}, the central value is 57, and 57+57 = 31+83 = 2*57. Hence, 1272 is in the sequence.
Alternatively, the symmetry can be seen from the differences between consecutive {h(k)}. For {57,31,57,83,57}, the differences {h(k+1)-h(k)} are {-26,26,26,-26}.
		

Crossrefs

Programs

  • Mathematica
    lst={};f[n_]:=Module[{a=n,k=0},While[a!=1,k++;If[EvenQ[a],a=a/2,a=a*3+1]];k];Do[If[f[m]+f[m+4]==f[m+1]+f[m+3]&&f[m+2]==(f[m]+f[m+4])/2,AppendTo[lst,m]],{m,1,4000}];lst

A268268 a(n) begins the first chain of 7 consecutive positive integers of h-values with symmetrical gaps about the center, where h(k) is the length of the finite sequence k, f(k), f(f(k)), ..., 1 in the Collatz (or 3x + 1) problem.

Original entry on oeis.org

943, 1377, 1494, 1495, 1680, 1681, 1682, 1991, 1992, 1993, 2358, 2359, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994, 3288, 3289, 3360, 3542, 3543, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 4193, 4481, 4482, 4722, 4723, 4724, 4725, 4897, 4936, 4937, 5313, 5314
Offset: 1

Views

Author

Michel Lagneau, Jan 29 2016

Keywords

Comments

Or numbers k such that h(k) + h(k+6) = h(k+1) + h(k+5) and h(k+3) = (h(k) + h(k+6))/2, where h(k) is the length of k, f(k), f(f(k)), ..., 1 in the Collatz (or 3x + 1) problem.
a(1) = A078441(7).
The symmetry can be seen from the differences between consecutive h(k) (see the example).
The 7-tuple of consecutive h(k) are symmetric about the central value h(k+3) which are averages of both their immediate neighbors, their second neighbors and their third neighbors.
A majority of numbers of the sequence generate trivial 7-tuples {m, m, m, m, m, m, m}.
The 7-tuples {h(k)} of the form {m, p, p, p, p, p, q} are generated by the numbers of the sequence 1377, 4897, ...
The 7-tuples {h(k)} of the form {m, m, p, m, q, m, m} are generated by the numbers of the sequence 5511, 58757, ...
The 7-tuples {h(k)} of the form {m, p, m, m, m, q, p} are generated by the numbers of the sequence 9514, ...
The 7-tuples {h(k)} of the form {m, m, p, p, p, q, q} are generated by the numbers of the sequence 21442, 25666, ...
The 7-tuples {h(k)} of the form {m, m, m, p, q, q, q} are generated by the numbers of the sequence 55108, 55293, ...

Examples

			In 7-tuple of consecutive {h(k)}: {h(9514),h(9515),h(9516),h(9517),h(9518),h(9519),h(9520)} = {78,52,78,78,78,104,78}, the central value is 78, and 78+78 = 52+104 = 2*78. Hence, 9514 is in the sequence.
Alternatively, the symmetry can be seen from the differences between consecutive {h(k)}. For {78,52,78,78,78,104,78}, the differences {h(k+1)-h(k)} are {-26,26,0,0,26,-26}.
		

Crossrefs

Programs

  • Mathematica
    lst={};f[n_]:=Module[{a=n,k=0},While[a!=1,k++;If[EvenQ[a],a=a/2,a=a*3+1]];k];Do[If[f[m]+f[m+6]==f[m+1]+f[m+5]&&f[m+2]+f[m+4]==f[m]+f[m+6]&& f[m]+f[m+6]==f[m+2]+f[m+4]&&f[m+3]==(f[m]+f[m+6])/2,AppendTo[lst,m]],{m,1,6000}];lst

A268288 a(n) begins the first chain of 9 consecutive positive integers of h-values with symmetrical gaps about the center, where h(k) is the length of the finite sequence k, f(k), f(f(k)), ...., 1 in the Collatz (or 3x + 1) problem.

Original entry on oeis.org

1680, 1991, 2987, 2988, 2989, 2990, 2991, 2992, 3982, 3983, 3984, 3985, 3986, 4722, 4723, 5313, 5314, 5315, 5316, 5317, 6576, 6577, 6578, 7083, 7084, 7085, 7086, 7087, 7088, 7089, 7090, 7091, 7794, 7795, 7976, 7977, 7978, 7979, 7980, 7981, 8769, 8770, 8771
Offset: 1

Views

Author

Michel Lagneau, Jan 30 2016

Keywords

Comments

a(1) = A078441(9).
The 9-tuple of consecutive h(k) are symmetric about the central value h(k+4) which are averages of both their immediate neighbors, their second neighbors, their third neighbors and their fourth neighbors.
A majority of numbers the sequence generate trivial 9-tuples (m, m, m, m, m, m, m, m, m).
For a(n) < 200000, the following sets have been identified:
The 9-tuples {h(k)} of the form {m, p, p, p, p, p, p, p, q} are generated by the numbers of the sequence 12608, 16915, 39169, ...
The 9-tuples {h(k)} of the form {m, p, q, q, q, q, q, m, p} are generated by the numbers of the sequence 40553, ...
The 9-tuples {h(k)} of the form {m, p, p, p, q, m, m, m, p} are generated by the numbers of the sequence 55107, 124739, ...
The 9-tuples {h(k)} of the form {m, m, m, m, p, q, q, q, q} are generated by the numbers of the sequence 55292, 90396, 118109, ...
The 9-tuples {h(k)} of the form {m, m, m, p, m, q, m, m, m} are generated by the numbers of the sequence 58756, 71236, 79428, ...
The 9-tuples {h(k)} of the form {m, m, p, m, m, m, q, m, m} are generated by the numbers of the sequence 78021, ...
The 9-tuples {h(k)} of the form {m, p, m, m, m, m, m, q, m} are generated by the numbers of the sequence 93600, 124768, ...
The 9-tuples {h(k)} of the form {m, m, m, p, p, p, q, q, q} are generated by the numbers of the sequence 160705, ...

Examples

			In 9-tuple of consecutive h(k): {h(55107),h(55108),...,h(55115)} = {184,60,60,60,122,184,184,184,60}, the central value is 122, and 184+60 = 2*122. Hence, 55107 is in the sequence.
Alternatively, the symmetry can be seen from the differences between consecutive h(k). For {184,60,60,60,122,184,184,184,60}, the differences h(k+1)-h(k) are (-124,0,0,62,62,0,0,-124).
		

Crossrefs

Programs

  • Mathematica
    lst={};f[n_]:=Module[{a=n,k=0},While[a!=1,k++;If[EvenQ[a],a=a/2,a=a*3+1]];k];Do[If[f[m]+f[m+8]==f[m+1]+f[m+7]&&f[m+2]+f[m+6]==f[m+3]+f[m+5]&& f[m]+f[m+8]==f[m+3]+f[m+5]&&f[m+4]==(f[m]+f[m+8])/2,AppendTo[lst,m]],{m,1,6000}];lst

A268468 Least k starting a chain or (2n+1)-tuple of consecutive integers {h(k+i)}, i=0,1,...,2n (excluding the trivial chain when h(k) = h(k+1) = ... = h(k+2n)) with symmetrical gaps about the center, where h(k) is the length of the finite set {k, f(k), f(f(k)),...,1} in the Collatz (or 3x + 1) problem.

Original entry on oeis.org

4, 507, 1377, 12608, 55291, 55290, 55289, 145645, 104455, 104454, 336734, 336733, 336732, 525907, 1960873, 1836239, 2176265, 2176264, 2176263, 2176262, 2176261, 2176260, 2176259, 2176258
Offset: 1

Views

Author

Michel Lagneau, Feb 05 2016

Keywords

Comments

It is interesting to search for symmetries in the sequence A006577 (number of halving and tripling steps to reach 1 in '3x+1' problem). The symmetrical architecture is given by the following property: h(k) + h(k+2n) = h(k+1)+ h(k+2n-1)= ... = h(k+n-1)+ h(k+n+1) = 2*h(k+n) where h(k+n) is the symmetrical center.
We observe two essential families of chains containing symmetries:
(i) A majority of trivial chains are obtained when a(n) begins the first chain of 2n+1 consecutive positive integers where h(k) = h(k+1) = ... = h(k+2n). This case is not considered here, but is mentioned in A078441. If this case were to be considered, it would be found that a(n) = A078441(2n+1) = 28, 98, 943, 1680, 2987, 2987, 7083, 7083, ...
(ii) Chains having several distinct values. This case is more interesting, with an important question: how many distinct values can contain such a set {h(k)}? It appears that this value is equal to 3, and the sequence of the reduced corresponding sets is {4, 5, 6}, {35, 48, 61}, {96, 127, 158}, {32, 63, 94}, {91, 122, 153}, {91, 122, 153}, {91, 122, 153}, {126, 188, 250}, ... The corresponding symmetrical centers are 5, 48, 127, 63, 122, 122, 122, 188, 172, 172, 184, 184, 184, 164, 184, 202, 210, 210, 210, 210, 210, 210, 210, 210, ...

Examples

			a(1) = 4 because in the first 3-tuple {h(4),h(5),h(6)} = {2, 5, 8}, the numbers are symmetric w.r.t. the central h(5)= 5 since 2+8 = 2*5. Hence 4 belongs to the sequence.
Alternatively, the symmetry can be seen from the differences between consecutive h(k). For {2,5,8}, the set of the differences is {3,3}.
a(3) = 10136 because in 7-tuple of consecutive {h(k)} = {34, 34, 34, 60, 86, 86, 86}, the numbers are symmetric w.r.t. its central h(k+3) = 60, since 34+86 = 2*60, and this is the smallest such 7-tuple. Hence 10136 belongs to the sequence.
Alternatively, the symmetry can be seen from the differences between consecutive h(k). From the set {34, 34, 34, 60, 86, 86, 86}, the set of the differences is {0,0,26,26,0,0}.
		

Crossrefs

Programs

  • Maple
    nn:=10^7:T:=array(1..nn):
    for j from 1 to 5*10^6 do:
      k:=0:m:=j:it:=0:
        for i from 1 to nn while(m<>1) do:
         if irem(m,2)=0
          then
           m:=m/2:
          else
          m:=3*m+1:
         fi:
        it:=it+1:
        od:
        k:=j:T[j]:=it:
       od:
       for n from 3 by 2 to 50 do:
       ii:=0:
       for j from 1 to nn while(ii=0)do:
         q:=T[j]+T[j+n-1]:
         itr:=0:lst:={}:
         for jj from 1 to (n-1)/2 do:
          lst:=lst union {T[j+jj-1]} union {T[j+n-jj]}:
          if T[j+jj-1]+T[j+n-jj]=q and T[j+(n-1)/2]=q/2
           then
           itr:=itr+1:
           else fi:
          od:
          if itr=(n-1)/2 and nops(lst)>1 then ii:=1:
          printf("%d %d \n",n,j):
          else
          fi:
         od:
         od:

A341362 a(n) begins the first sequence of n consecutive positive integers with the same h-value and the same d-value in the Collatz (or '3x + 1') problem.

Original entry on oeis.org

1, 54, 108, 290, 290, 386, 172146, 298200, 596400, 596400, 596400, 795201, 795201, 2849196, 2849196, 8965036, 33659819, 45529226, 52417676, 93186987, 104161282, 104161282, 104161282, 436089218, 436089218, 605581697, 934358530, 934358530, 934358530, 3826876112
Offset: 1

Views

Author

Lamine Ngom, Feb 10 2021

Keywords

Comments

The Collatz function is as follows: F(x) = x/2 if x is even, otherwise F(x) = 3*x+1.
It is conjectured that starting from any number, and repeatedly applying the function on its previous result, we will always reach 1.
The d-value (or flight duration, A006577) is the number of steps needed to reach 1. The h-value (or flight height, A025586) is the maximum of the number's trajectory.

Examples

			a(3) = 108 because 108, 109 and 110 have same d-value (113) and same h-value (9232).
And 108 is the smallest number starting such sequence of 3 consecutive positive integers with same d-value and same h-value.
		

Crossrefs

Cf. A078441, A277109, A268253, A006577 (duration), A025586 (height), A056959.
Showing 1-6 of 6 results.