OFFSET
1,2
EXAMPLE
a(1)=0 (3 > [none] > 2);
a(2)=9 (5 < 8,9,10,14,15,16,20,21,22 < 23);
a(3)=19 (7 < 8,9,10,14,15,16,20,21,22,24,25,26,27,28,32,33,34,35,36 < 37).
MAPLE
isA001097 := proc(n) isprime(n) and ( isprime(n+2) or isprime(n-2) ); end proc:
A001097 := proc(n) option remember; if n =1 then 3; else for a from procname(n-1)+2 by 2 do if isA001097(a) then return a; end if; end do: end if; end proc:
A007510 := proc(n) option remember; if n <= 2 then op(n, [2, 23]) ; else for a from procname(n-1)+2 by 2 do if isprime(a) and not isprime(a+2) and not isprime(a-2) then return a; end if; end do: end if; end proc:
A167529 := proc(n) a := 0 ; for k from A001097(n)+1 to A007510(n)-1 do if isA164276(k) then a := a+1 ; end if; end do: a ; end proc:
seq(A167529(n), n=1..120) ; # R. J. Mathar, May 30 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Nov 06 2009
EXTENSIONS
Corrected (23 replaced with 22, 28 with 27) and extended by R. J. Mathar, May 30 2010
STATUS
approved