login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A182071 Number of primes in the half-open interval [n*sqrt((n-1)/2), (n+1)*sqrt(n/2)). 0
0, 1, 1, 2, 0, 1, 1, 1, 1, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 1, 1, 1, 1, 1, 2, 2, 0, 0, 2, 1, 1, 1, 1, 2, 1, 1, 2, 0, 3, 1, 1, 0, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 0, 1, 3, 0, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 3, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 3, 0, 1, 3, 3, 0, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 1, 3, 0, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
EXAMPLE
a(1)=0 because are no primes in half-open interval [1*sqrt((1-1)/2), (1+1)*sqrt(1/2)),
a(2)=1 because prime 2 is in half-open interval [2*sqrt((2-1)/2), (2+1)*sqrt(2/2)),
a(3)=1 because primes 3 is in half-open interval [3*sqrt((3-1)/2),(3+1)*sqrt(3/2)),
a(4)=2 because primes 5,7 are in half-open interval [4*sqrt((4-1)/2), (4+1)*sqrt(4/2)).
MAPLE
with(numtheory);
f:=proc(n) local t1, t2, eps;
t1:=floor((n+1)*sqrt(n/2));
if t1 = (n+1)*sqrt(n/2) then t1:=t1-1; fi;
t2:=ceil(n*sqrt((n-1)/2));
eps:=0;
if isprime(t2) then eps:=1; fi;
pi(t1)-pi(t2)+eps;
end;
[seq(f(n), n=1..120)]; # N. J. A. Sloane, Apr 26 2012
CROSSREFS
Cf. A006002.
Sequence in context: A105241 A134541 A286627 * A317992 A228085 A154782
KEYWORD
nonn
AUTHOR
Gerasimov Sergey, Apr 10 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)