login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A344582
a(n) is the least k such that there are exactly n primes between prime(k) + 1 and floor(prime(k + 1)^2/prime(k)) (inclusive) or 0 if no such k exists.
1
1, 2, 4, 30, 180, 462, 890, 1532, 3385, 19871, 29040, 59257, 66762, 31545, 597311, 1448751, 1421021, 1293698, 12768473, 2279181, 147165284, 118374763, 821495413, 2618883054, 2247521689, 3145845927, 7650216016, 27357920380, 22859974504, 189924891289, 78076882908, 189573830057
OFFSET
1,2
COMMENTS
a(n) is the least k such that A228098(k) = n.
EXAMPLE
a(4) = 30 as there are exactly 4 primes between prime(30) + 1 = 114 and floor(prime(31)^2/prime(30)) = 142 namely the four primes 127, 131, 137 and 139.
PROG
(PARI) upto(n) = {my(i, p, q, res = vector(1)); i = 1; p = 2; forprime(q = 3, oo, u = q^2\p; t = 1; forprime(r = q + 1, u, t++); if(t > #res, res = concat(res, vector(t - #res))); if(res[t] == 0, res[t] = i; ); p = q; i++; if(i > n, return(res))); }
CROSSREFS
Sequence in context: A058779 A359914 A230777 * A241542 A241540 A349265
KEYWORD
nonn
AUTHOR
David A. Corneth, May 24 2021
EXTENSIONS
a(24)-a(32) from Martin Ehrenstein, Jun 02 2021
STATUS
approved