OFFSET
1,1
LINKS
Hans Havermann, Table of n, a(n) for n = 1..10000.
Hans Havermann, Plot of n, a(n) for n = 1..10000
EXAMPLE
5 is the smallest prime p = prime(n) such that p = (prime(n-1)+prime(n+1))/2 (5 = (3+7)/2).
MATHEMATICA
f[n_] := Block[{k = n + 1, p}, While[p = (Prime[k - n] + Prime[k + n])/2; p != Prime[k], k++ ]; p]; Table[f[n], {n, 58}] (* Ray Chandler, Dec 27 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Dec 21 2006
EXTENSIONS
Extended by Ray Chandler, Dec 27 2006
Figure and b-file updated by Hans Havermann, Feb 07 2007
STATUS
approved