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-3 of 3 results.

A339769 Number of unique heights that are achieved by only one starting number in the Collatz (or '3x+1') problem when starting from numbers in the range [2^n, 2^(n+1)).

Original entry on oeis.org

1, 2, 4, 4, 5, 6, 10, 12, 9, 7, 4, 9, 13, 11, 7, 6, 8, 10, 13, 14, 10, 15, 14, 21, 8, 7, 13, 21
Offset: 0

Views

Author

Hartmut F. W. Hoft, Dec 16 2020

Keywords

Comments

The number of unique heights in each interval [2^n, 2^(n+1)) appears to be linear in n - with large oscillations about the best fit line - while the values of attained maximum heights appear to be quadratic in n.
Neither this sequence nor the corresponding sequence of maximum heights in each interval is monotone, e.g.: a(23..27) = (21, 8, 7, 13, 21) and the corresponding maximum heights are (704, 702, 949, 947, 956).

Examples

			a(5)=6 since the 6 heights 5, 26, 34, 109, 29, 104 are uniquely attained from the starting numbers 32, 33, 39, 41, 43, 47, respectively. The largest of the distinct heights (A280341) in the interval [32,64) however is 112.
a(11)=9 with largest unique height 237 for starting value 3711 in interval [2^11, 2^12) also is the largest height for all starting values in the interval.
		

Crossrefs

Programs

  • Mathematica
    collatz[n_] := If[EvenQ[n], n/2, 3n+1]
    height[n_] := Length[NestWhileList[collatz, n, #!=1&]] - 1
    a339769[n_] := Module[{heightL={}, countL={}, s, h, p}, For[s=2^n, s<2^(n+1), s++, h=height[s]; If[!MemberQ[heightL, h], AppendTo[heightL, h]; AppendTo[countL, 1], {{p}}=Position[heightL, h]; countL[[p]]+=1]]; Length[Select[Transpose[{heightL, countL}], #[[2]]==1&]]]
    (* sequence data; long computation times for n >= 22 *)
    Map[a339769, Range[0, 27]]

A335569 a(n) is the maximum height achieved in the Collatz ('3x+1') problem when starting from numbers in the range [2^n, 2^(n+1)).

Original entry on oeis.org

0, 7, 16, 19, 111, 112, 118, 127, 143, 178, 181, 237, 261, 275, 307, 339, 353, 442, 469, 524, 556, 596, 664, 704, 705, 949, 950, 956, 964, 986, 1008, 1050, 1131, 1210, 1219, 1220, 1234, 1307, 1321
Offset: 0

Views

Author

Hartmut F. W. Hoft, Jan 26 2021

Keywords

Comments

This sequence is strictly increasing since the height of number 2*k is one larger than the height of k; it appears to fit a quadratic with respect to exponent n. Through n=27 the maximum values are achieved by odd starting values and most are unique heights. The non-unique exceptions are:
max height start values previous max height
a(5) = 112 54, 55 a(4) = 111
a(7) = 127 231, 235 a(6) = 118
a(24)= 705 31466382, 31466383 a(23)= 704
a(26)= 950 127456254, 127456255 a(25)= 949
Since a(5) = a(4) + 1 and a(26) = a(25) + 1, and since probably many additional such pairs exist, maximum heights cannot be used in showing that A280341 is strictly increasing.

Examples

			a(35) = 1220 is the smallest term having 3 start values achieving maximum height: 63389366646, 63389366647, 64375365601. - _Bert Dobbelaere_, Feb 13 2021
		

Crossrefs

Programs

  • Mathematica
    collatz[n_] := If[EvenQ[n], n/2, 3n+1]
    height[n_] := Length[NestWhileList[collatz, n, #!=1&]] - 1
    a335569[n_] := Max[Map[height, Range[2^n, 2^(n+1)-1]]]
    (* sequence data; long computation times for n >= 22 *)
    Map[a335569, Range[0, 27]]

Extensions

a(28)-a(38) from Bert Dobbelaere, Feb 13 2021

A339773 a(n) is the first number k such that the n Collatz runs starting at the consecutive numbers k, k+1, ..., k+n-1 all have the same prime-valued height while the runs starting at k-1 and k+n have nonprime heights.

Original entry on oeis.org

25, 14, 108, 314, 1154, 840, 3360, 1494, 24408, 4722, 6576, 33578, 124097, 61442, 99248, 104879, 228296, 302956, 203436, 269698, 106122, 470826, 614402, 701224, 589826, 1369884, 252548, 1377184, 3126172, 1356161, 1370050, 1591584, 2065786, 8363804, 2054827
Offset: 1

Views

Author

Hartmut F. W. Hoft, Dec 16 2020

Keywords

Comments

The height of a Collatz run starting at a number m is the number of steps to reach 1, A006577(m).
There are three additional blocks with starting values less than 5000000: a(35, 40, 49) = (2054827, 596310, 4330040); a(34) = 8363804. Altogether there are 55 blocks with starting values at most 50000000, the highest of which is a(47) = 37669696 while a(45) > 50000000.
After searching up to about k = 5.3595*10^12, the largest-indexed term observed in the sequence thus far is a(1770) = 2490262807816 which begins a string of 1770 numbers whose Collatz sequence height is 331. - Kevin P. Thompson, Aug 27 2022
After searching up to about k = 3.293*10^13, the largest-indexed term observed in the sequence thus far is a(2225) = 23969528245354 which begins a string of 2225 numbers whose Collatz sequence height is 373. - Kevin P. Thompson, May 28 2023

Examples

			a(2) = 14 since the 2 adjacent numbers 14 and 15 are the first consecutive 2 whose height in their Collatz runs is the same prime number, in this case 17, while the heights for the Collatz runs at 13 and 16 are the nonprimes 9 and 4, respectively.
a(9) = 24408 since the 9 adjacent numbers 24408 .. 24416 are the first consecutive 9 whose height in their Collatz runs is the same prime number, in this case 157, while the heights for the Collatz runs at 24407 and 24417 are the nonprimes 64 and 69, respectively.
		

Crossrefs

Programs

  • Mathematica
    collatz[n_] := If[EvenQ[n], n/2, 3n+1]
    height[n_] := Length[NestWhileList[collatz, n, #!=1&]] - 1
    (* b is an estimate on the size of the list being computed *)
    a339773[n_, b_] := Module[{k=2, c, d, j, pList=Table[0, {b}]}, While[k<=n, c=height[k-1]; d=height[k]; j=k+1; If[!PrimeQ[c]&&PrimeQ[d], While[height[j]==d, j++]; If[!PrimeQ[height[j]]&&pList[[j-k]]==0, pList[[j-k]]=k]]; k=j]; pList]
    Take[a339773[5000000, 50], 33] (* sequence data *)

Extensions

a(34)-a(35) from Kevin P. Thompson, Aug 27 2022
Showing 1-3 of 3 results.