A195100 Numbers n such that there are no primes between (n-1)*sqrt(n-1) and n*sqrt(n).
1, 11, 21, 25, 28, 33, 66, 122, 140, 142, 188, 307, 322, 349, 1007, 1052
Offset: 1
Examples
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).
Links
- H. Cramér, On the order of magnitude of the difference between consecutive prime numbers, Acta Arith. 2 (1936), 23-46.
Programs
-
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 *)
-
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
Formula
a(n+1) = A144140(n) + 1. - Jinyuan Wang, Mar 22 2019
Comments