OFFSET
1,2
COMMENTS
Cramér's conjecture implies that the sequence is finite. - Robert Israel, Aug 11 2014
No more terms up to 2*10^10. - Jinyuan Wang, Mar 22 2019
LINKS
H. Cramér, On the order of magnitude of the difference between consecutive prime numbers, Acta Arith. 2 (1936), 23-46.
FORMULA
a(n+1) = A144140(n) + 1. - Jinyuan Wang, Mar 22 2019
EXAMPLE
a(1) = 1 because there are no numbers between (1-1)*sqrt(1-1) = 0 and 1*sqrt(1) = 1.
a(2) = 11 because (11-1)*sqrt(11-1) < (nonprimes 32,33,34,35,36) < 11*sqrt(11).
MAPLE
Primes:= select(isprime, {2, seq(2*i+1, i=1..10^6)}):
C:= map(p -> ceil(p^(2/3)), Primes);
{$1..max(C)} minus C; # Robert Israel, Aug 10 2014
MATHEMATICA
Select[Range[5000], (PrimePi[# Sqrt[#]] - PrimePi[(# - 1)Sqrt[# - 1]]) == 0 &] (* Alonso del Arte, Sep 09 2011 *)
Join[{1}, Flatten[Position[Partition[Table[PrimePi[n Sqrt[n]], {n, 1100}], 2, 1], _?(#[[2]]-#[[1]]==0&), 1, Heads->False]]+1] (* Harvey P. Dale, May 11 2018 *)
PROG
(PARI) for(n=1, 2*10^6, if(#primes([(n-1)*sqrt(n-1), n*sqrt(n)])==0, print1(n, ", "))) \\ Derek Orr, Aug 10 2014
(PARI) isok(n) = {k=floor((n-1)*sqrt(n-1))+1; while(!isprime(k), k++); k>n*sqrt(n); } \\ Jinyuan Wang, Mar 22 2019
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Juri-Stepan Gerasimov, Sep 09 2011
STATUS
approved