OFFSET
1,1
COMMENTS
Midpoint of cousin prime pairs.
The only prime is 5. All other terms are multiples of 3. - Zak Seidov, May 19 2014
LINKS
M. F. Hasler, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Cousin Primes
FORMULA
MAPLE
ZL:=[]:for p from 1 to 1485 do if (isprime(p) and isprime(p+4) ) then ZL:=[op(ZL), (p+(p+4))/2]; fi; od; print(ZL); # Zerinvary Lajos, Mar 07 2007
MATHEMATICA
lst={}; Do[If[PrimeQ[n-2]&&PrimeQ[n+2], AppendTo[lst, n]], {n, 3, 8!, 2}]; lst (* Vladimir Joseph Stephan Orlovsky, Jan 14 2009 *)
PROG
(PARI) s=[]; for(n=1, 2000, if(isprime(n-2) && isprime(n+2), s=concat(s, n))); s \\ Colin Barker, May 19 2014
(PARI) is_A087679(n)={isprime(n-2) && isprime(n+2)} \\ For numbers >> 10^12 one should add conditions {n%6==3 && ... || n==5} or consider only such numbers congruent to 3 (mod 6). - M. F. Hasler, Apr 05 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Sep 27 2003
EXTENSIONS
More terms from Ray Chandler, Oct 26 2003
STATUS
approved