Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A112341
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A112341 Number of primes between (prime(n)-1)^2 and prime(n)^2. +0
2
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; listen)
OFFSET

1,1

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}] (*Chandler*)

PROGRAM

(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: A089646 A011884 A029070 this_sequence A165684 A015743 A015755

Adjacent sequences: A112338 A112339 A112340 this_sequence A112342 A112343 A112344

KEYWORD

easy,nonn

AUTHOR

Enoch Haga (Enokh(AT)comcast.net), Sep 05 2005

EXTENSIONS

Edited by Ray Chandler (rayjchandler(AT)sbcglobal.net), Sep 06 2005

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 18 21:37 EST 2009. Contains 171024 sequences.


AT&T Labs Research