OFFSET
-1,2
COMMENTS
From Jianing Song, Feb 04 2019: (Start)
a(n) exists for all n >= -1. Proof: It's easy to show that lim inf b(m) = +oo and b(m+1) - b(m) <= 1 for all m. For every n >= -1, if b(m) = n, then there must exist some m' > m such that b(m') > n. Let m_0 be the smallest among such m', then b((m_0)-1) <= n, so b(m_0) <= b((m_0)-1) + 1 <= n + 1, but b(m_0) > n, so b(m_0) = n + 1. By induction every n >= -1 appears in the range of {b(m)}.
It appears that b(m) ~ m/log(m) - sqrt(m*log(m)) + o(1), so each value for {b(m)} should only appear finitely many times (e.g., b(m) = -1 only for m = 1, 10, 12, 16, 26, 27, 28, 35, 36, 40; b(m) = 0 only for some 44 m's).
It appears that {a(n)} is an increasing prime sequence, for n >= 0. (End)
MATHEMATICA
Table[Min[Flatten[Table[If[PrimePi[m] - IntegerPart[Sqrt[Prime[m]]] == n, m, {}], {m, 1, 500}]]], {n, -1, 20}]
PROG
(PARI) a(n) = for(m=1, oo, if(primepi(m)-sqrtint(prime(m))==n, return(m))) \\ Jianing Song, Feb 04 2019
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Roger L. Bagula, Apr 21 2008
EXTENSIONS
Edited by and more terms from Jianing Song, Feb 04 2019
STATUS
approved