OFFSET
1,1
COMMENTS
Numbers n such that nextprime(n-1) + prevprime(n+1) = 2n. - Wesley Ivan Hurt, May 13 2017
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
EXAMPLE
7 is prime, 9 is the average of 7 and 11, 11 is prime, 12 is the average of 11 and 13; so 7, 9, 11 and 13 are in the sequence.
MATHEMATICA
Function[p, Union@ Join[p, Rest@ Map[Mean, Partition[p, 2, 1]]]]@ Prime@ Range@ 34 (* Michael De Vlieger, May 13 2017 *)
PROG
(PARI) { for (n=1, 1000, if (n==1, a=2; p=3, if (n%2, a=(q + p=nextprime(q + 1))/2, a=q=p)); write("b063934.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 03 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Aug 21 2001
STATUS
approved