Original entry on oeis.org
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 18, 20, 22, 23, 25, 26, 27, 29, 31, 32, 33, 34, 35, 36, 39
Offset: 1
-
DeleteDuplicates[Table[PrimePi[Prime[n+1]^2/Prime[n]]-n,{n,100000}],GreaterEqual] (* The program generates the first 12 terms of the sequence. *) (* Harvey P. Dale, Jan 29 2023 *)
Original entry on oeis.org
2, 3, 7, 113, 1069, 3271, 6917, 12853, 31397, 223151, 338033, 370261, 8917523, 20388583, 37305713, 2433630109, 18562236551, 53153925667, 75505974031, 190721857463, 595999647599, 2135405360509, 5359567534201, 6353762427407, 12673125337921, 18817847498917, 24460380625103, 47581758352253
Offset: 1
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.
Original entry on oeis.org
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
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.
-
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))); }
Showing 1-3 of 3 results.
Comments