

A112342


Number of primes between (nth composite  1)^2 and (nth composite)^2.


1



2, 2, 3, 4, 3, 4, 5, 4, 6, 5, 6, 7, 7, 6, 9, 8, 7, 8, 8, 10, 9, 10, 9, 10, 9, 12, 11, 11, 12, 11, 13, 13, 15, 10, 11, 15, 12, 13, 11, 12, 17, 16, 13, 17, 15, 14, 16, 15, 17, 13, 15, 17, 17, 18, 22, 14, 23, 13, 20, 20, 17, 16, 21, 22, 18, 20, 20, 19, 23, 21, 21, 22, 23, 21, 22, 21, 21
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


LINKS

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


FORMULA

a(n) = A000720(A002808(n)^2)  A000720((A002808(n)1)^2).  Chandler
Begin with the first prime, compute square root, take floor and add 1. If result is a composite number then begin the count for that composite value. Increment the count until the composite value changes.


EXAMPLE

a(1)=2 because for primes 11 and 13, the floor of the square root of both primes is 3. Since 1 is added to each, 3+1=4, for the composite 4 the count is 2.


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. A112341.
Sequence in context: A328803 A328804 A064514 * A256094 A063712 A185977
Adjacent sequences: A112339 A112340 A112341 * A112343 A112344 A112345


KEYWORD

easy,nonn


AUTHOR

Enoch Haga, Sep 05 2005


EXTENSIONS

Edited by Ray Chandler, Sep 06 2005


STATUS

approved



