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.
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
Keywords
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.
Links
- Kevin P. Thompson, Table of n, a(n) for n = 1..784
- Kevin P. Thompson, Table of n, a(n) for n = 1..1001 with missing values
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
Comments