OFFSET
1,1
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A046117(n) - 3.
MAPLE
ZL:=[]:for p from 1 to 600 do if (isprime(p) and isprime(p+6) ) then ZL:=[op(ZL), (p+(p+6))/2]; fi; od; print(ZL); # Zerinvary Lajos, Mar 07 2007
MATHEMATICA
lst={}; Do[If[PrimeQ[n-3]&&PrimeQ[n+3], AppendTo[lst, n]], {n, 10^3}]; lst (* Vladimir Joseph Stephan Orlovsky, Sep 08 2008 *)
Select[Range[600], AllTrue[#+{3, -3}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 06 2015 *)
PROG
(Haskell)
a087695 n = a087695_list !! (n-1)
a087695_list = filter
(\x -> a010051' (x - 3) == 1 && a010051' (x + 3) == 1) [2, 4 ..]
-- Reinhard Zumkeller, Nov 17 2015
(PARI) p=2; q=3; forprime(r=5, 1e3, if(q-p<7 && (q-p==6 || r-p==6), print1(p+3", ")); p=q; q=r) \\ Charles R Greathouse IV, May 22 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Zak Seidov, Sep 27 2003
STATUS
approved