OFFSET
1,1
COMMENTS
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 1..10000
EXAMPLE
MATHEMATICA
Module[{prs=Prime[Range[800]], tp, nt}, tp=Flatten[Select[Partition[ prs, 2, 1], #[[2]]- #[[1]]==2&]]; nt=Complement[prs, tp]; Select[Tally[ Join[ Mean/@ Partition[tp, 2, 1], Mean/@Partition[nt, 2, 1]]], #[[2]]==2&][[All, 1]]] (* Harvey P. Dale, Sep 03 2016 *)
PROG
(PARI)
a244066(pmax) = {
my(tp=[], m, j, k, s=[]);
forprime(p=2, pmax, if(isprime(p-2) || isprime(p+2), tp=concat(tp, p)));
for(i=1, #tp-1,
m=(tp[i]+tp[i+1])\2;
j=1; while(!(isprime(m+j) && !isprime(m+j-2) && !isprime(m+j+2)), j++);
k=1; while(!(isprime(m-k) && !isprime(m-k-2) && !isprime(m-k+2)), k++);
if(j==k, s=concat(s, m))
);
s
}
a244066(5000) \\ Colin Barker, Jul 18 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jun 19 2014
EXTENSIONS
Definition corrected by Antti Karttunen, Jun 21 2014.
Terms and definition corrected by Colin Barker, Jul 18 2014
STATUS
approved