OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ n log n. - Charles R Greathouse IV, Apr 29 2015
MATHEMATICA
With[{nn = 78}, {2}~Join~Union[Transpose[Select[Partition[Prime@ Range@ nn, 3, 1], And[#[[2]] - #[[1]] != 2, #[[3]] - #[[2]] != 2] &]][[2]], Map[Mean, Select[Partition[Prime@ Range@ nn, 2, 1], Differences@ # == {2} &]]]] (* Michael De Vlieger, Feb 22 2017, after Harvey P. Dale at A007510 and A014574 *)
PROG
(PARI) is(n)=if(n%6, (isprime(n) && !isprime(n-2) && !isprime(n+2)) || n==4, isprime(n-1) && isprime(n+1)) \\ Charles R Greathouse IV, Apr 29 2015
(PARI) lista(pmax) = {my(p1 = 2, p2 = 3); print1(2, ", "); forprime(p3 = 5, pmax, if(p2 == p1 + 2, print1(p1 + 1, ", ")); if(p2 != p1 + 2 && p2 != p3 - 2, print1(p2, ", ")); p1 = p2; p2 = p3); } \\ Amiram Eldar, May 17 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Nov 10 2009, Nov 14 2009
EXTENSIONS
Corrected (97 inserted) by R. J. Mathar, Nov 16 2009
STATUS
approved