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.

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.

This page as a plain text file.
%I A339773 #25 Jul 04 2023 10:08:23
%S A339773 25,14,108,314,1154,840,3360,1494,24408,4722,6576,33578,124097,61442,
%T A339773 99248,104879,228296,302956,203436,269698,106122,470826,614402,701224,
%U A339773 589826,1369884,252548,1377184,3126172,1356161,1370050,1591584,2065786,8363804,2054827
%N 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.
%C A339773 The height of a Collatz run starting at a number m is the number of steps to reach 1, A006577(m).
%C A339773 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.
%C A339773 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
%C A339773 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
%H A339773 Kevin P. Thompson, <a href="/A339773/b339773.txt">Table of n, a(n) for n = 1..784</a>
%H A339773 Kevin P. Thompson, <a href="/A339773/a339773_1.txt">Table of n, a(n) for n = 1..1001 with missing values</a>
%e A339773 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.
%e A339773 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.
%t A339773 collatz[n_] := If[EvenQ[n], n/2, 3n+1]
%t A339773 height[n_] := Length[NestWhileList[collatz, n, #!=1&]] - 1
%t A339773 (* b is an estimate on the size of the list being computed *)
%t A339773 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]
%t A339773 Take[a339773[5000000, 50], 33] (* sequence data *)
%Y A339773 Cf. A006577, A008908, A280341.
%K A339773 nonn
%O A339773 1,1
%A A339773 _Hartmut F. W. Hoft_, Dec 16 2020
%E A339773 a(34)-a(35) from _Kevin P. Thompson_, Aug 27 2022