OFFSET
1,1
COMMENTS
Cf. A089344.
EXAMPLE
a(4) = 4327, the previous prime is 4297, 4327-4297 = 30, the next four primes are 4337, 4339, 4349 and 4357. 4357-4327 = 30.
MATHEMATICA
f[n_] := Block[{k = n + 1}, While[ 2Prime[k] != Prime[k - 1] + Prime[k + n], k++ ]; Prime[k]]; Table[ f[n], {n, 18}]
PROG
(PARI) a(n)=local(k=1); if(n<1, 0, until(prime(k)-prime(k-1)==prime(k+n)-prime(k), k++); prime(k)) /* Michael Somos, Feb 01 2004 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Nov 11 2003
STATUS
approved