OFFSET
1,2
COMMENTS
EXAMPLE
a(1)=1 because 2*3 < 7 (prime) < 2*5;
a(2)=2 because 2*5 < 11 (prime) < 13(prime) < 2*7;
a(3)=1 because 2*11 < 23 (prime) < 2*13.
MAPLE
A001359 := proc(n) option remember; if n = 1 then 3; else for a from procname(n-1)+2 by 2 do if isprime(a) and isprime(a+2) then return a; end if; end do: end if; end proc:
seq(A176811(n), n=1..120) ; # R. J. Mathar, Apr 27 2010
MATHEMATICA
PrimePi[2*#[[2]]]-PrimePi[2*#[[1]]]&/@Select[Partition[Prime[Range[1000]], 2, 1], #[[2]]- #[[1]] == 2&] (* Harvey P. Dale, Jul 21 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Apr 26 2010
EXTENSIONS
Terms corrected starting at a(34) by R. J. Mathar, Apr 27 2010
STATUS
approved