A364787 a(n) is the stabilization index of the prime ladder [P(n,k) : k >= 0].
0, 1, 3, 2, 7, 6, 17, 17, 19, 18, 13, 13, 11, 11, 47, 46, 39, 39, 59, 59, 68, 68, 71, 71, 61, 61, 60, 59, 56, 55, 49, 49, 47, 47, 334, 333, 508, 508, 488, 488, 466, 466, 423, 423, 512, 512, 488, 488, 468, 468, 450, 450, 696, 696, 652, 652, 639, 638, 613, 613
Offset: 0
Keywords
Examples
a(4) = 7 because P(4,0) = 2, P(4,1) = 5, P(4,2) = 7, P(4,3) = 11, P(4,4) = 13, P(4,5) = 17, P(4,6) = 19, and for k >= 7, P(4,k) = 23.
Links
- Eduard Roure Perdices, Table of n, a(n) for n = 0..807
Programs
-
Mathematica
SequenceA[n_] := Module[{pn0 = 2, pnk, an = 0}, While[True, pnk = NextPrime[pn0 + n + 1, -1]; If[pn0 == pnk, Break[], pn0 = pnk; an++]]; Return[an];];
Comments