OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
The twin prime pairs are (3,5), (5,7), (11,13), (17,19), etc. a(n) is equidistant from the higher prime in the n-th pair and the lower prime in the (n+1)th pair. E.g., a(2) is the mean of 7 and 11, which is 9.
MATHEMATICA
t = Select[ Prime@ Range@ 250, PrimeQ[# + 2] &]; Most@ t + Differences[t]/2 + 1 (* Robert G. Wilson v, Jul 26 2015 *)
PROG
(PARI) lista(nn) = {forprime (p=2, nn, q = nextprime(p+1); if (q==p+2, forprime (pp=q, nn, if (nextprime(pp+1) == pp+2, print1((q+pp)/2, ", "); break; ); ); ); ); } \\ Michel Marcus, Jul 26 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Neil Fernandez, Oct 05 2002
STATUS
approved