login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A112341 Number of primes between (prime(n)-1)^2 and prime(n)^2. 1
2, 2, 3, 4, 5, 5, 7, 6, 7, 9, 8, 9, 12, 9, 10, 16, 13, 16, 15, 21, 15, 18, 19, 18, 21, 23, 20, 24, 23, 25, 29, 28, 23, 27, 33, 32, 27, 32, 33, 30, 29, 36, 34, 37, 37, 37, 38, 41, 45, 38, 39, 49, 47, 45, 53, 46, 53, 46, 45, 49, 53, 51, 48, 49, 55, 51, 62, 66, 61, 61, 60, 66, 63, 61 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..74.

FORMULA

a(n) = A000720(A000040(n)^2) - A000720((A000040(n)-1)^2). - Chandler

Begin with the first prime, compute square root, take floor and add 1. If result is a prime number then begin the count for that prime value. Increment the count until prime value changes.

EXAMPLE

a(5)=5 because for primes 101-103-107-109-113 the floor of the square root of each is 10. for each 10, 1 is added, so for prime 11 the count is 5.

MATHEMATICA

f[n_] := PrimePi[Prime[n]^2] - PrimePi[(Prime[n] - 1)^2]; Table[f[n], {n, 74}] (* Ray Chandler, Sep 06 2005 *)

PROG

(UBASIC) 10 A=1 20 B=nxtprm(B) 30 C=int(sqrt(B)) 40 D=C+1 50 if E=D then N=N+1:else print N:N=1:stop 60 if D=prmdiv(D) then print B; C; D; "-" 70 E=D 80 goto 20

CROSSREFS

Cf. A112342.

Sequence in context: A241730 A011884 A029070 * A242774 A183003 A307779

Adjacent sequences:  A112338 A112339 A112340 * A112342 A112343 A112344

KEYWORD

easy,nonn

AUTHOR

Enoch Haga, Sep 05 2005

EXTENSIONS

Edited by Ray Chandler, Sep 06 2005

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 4 12:18 EDT 2020. Contains 335448 sequences. (Running on oeis4.)