OFFSET
1,2
EXAMPLE
a(2)=7 counts the numbers 3, 5, 7, 11, 13, 17, 19 below 23=A007510(2).
MAPLE
isA007510 := proc(n) RETURN(isprime(n) and not isprime(n-2) and not isprime(n+2)) ; end:
isA001097 := proc(n) RETURN(isprime(n) and (isprime(n-2) or isprime(n+2)) ) ; end:
A007510 := proc(n) local a; if n = 1 then 2; else for a from procname(n-1)+1 do if isA007510(a) then RETURN(a) ; fi; od: fi; end:
A162308 := proc(n) local a, k; a := 0 ; for k from 3 to A007510(n)-1 do if isA001097(k) then a := a+1; fi; od; a; end:
seq(A162308(n), n=1..120) ; # R. J. Mathar, Jul 02 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jul 01 2009
EXTENSIONS
Edited by R. J. Mathar, Jul 02 2009
STATUS
approved