OFFSET
1,2
COMMENTS
Also, the number of terms by Andrica ranking which are greater than 1/n.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..200
Marek Wolf, A Note on the Andrica Conjecture, arXiv:1010.3945 [math.NT], 2010.
EXAMPLE
a(1) = 6 because only the primes 3, 7, 13, 23, 31 and 113 satisfy the criterion.
As an example, - sqrt(3) + sqrt(5) ~= 0.50401717 which is greater than 1/2.
MATHEMATICA
lst = {}; p = 2; q = 3; While[p < 10^8, If[ Sqrt[q] - Sqrt[p] > 1/50, AppendTo[lst, {p, Sqrt[q] - Sqrt[p]}]]; p = q; q = NextPrime[q]]; Table[ Length@ Select[ lst, #[[2]] > 1/n &], {n, 50}]
nn = 50; t = Table[0, {nn}]; p = 2; q = 3; While[p < 10^8, n = Floor[1/(Sqrt[q] - Sqrt[p])]; If[n <= nn, t[[n]]++]; p = q; q = NextPrime[q]]; Join[{0}, Accumulate[t]] (* T. D. Noe, Oct 18 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Marek Wolf and Robert G. Wilson v, Oct 18 2012
STATUS
approved