A251736 Corresponding values of np for A246792.
1, 2, 5, 5, 8, 9, 9, 12, 12, 15, 15, 15, 20, 24, 24, 24, 24, 29, 28, 28, 28, 32, 32, 32, 30, 37, 43, 40, 41, 43, 43, 43, 39
Offset: 1
Crossrefs
Cf. A246792.
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.
a(8) = 1184231 since np(1184231) = 17, np(1184231+1) = 18, ..., np(1184231+6) = 23, np(1184231+7) = 24 are 8 consecutive numbers and 1184231 is the smallest number with this property.
np[n_] := np[n] = Length[Select[Range[Prime[n]+1, Prime[n]^(1 + 1/n)], PrimeQ]]; a[1]=1; a[n_] := a[n] = (For[m = a[n-1], c = Table[np[m+k], {k,0,n-1}]; c != Range[Min[c], Max[c]], m++]; m); Do[Print[a[n]],{n, 8}]
np(t) = primepi(prime(t)^(1 + 1/t)) - t; ok(m, n) = {for (k=0, n-1, if (np(m+k) != np(m)+k, return(0));); return (1);} a(n) = {m = 1; while (! ok(m, n), m++); m;} \\ Michel Marcus, Nov 25 2014
Comments