OFFSET
0,2
COMMENTS
Up to n = 75, I have found no multiple > 12.
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..1000
EXAMPLE
For a(3) we wish to find a k such that the average of Pi(k+3) + Pi(k-3) is a multiple of k. The least k that meets this criterion is 28. (Pi(31) + Pi(25))/2 is (127 + 97)/2 = 112 = 4*28.
MATHEMATICA
b = {}; Do[ a = Table[ Prime[ i ], {i, 1, 2n + 1} ]; k = 2n + 1; While[ !IntegerQ[ (a[ [ 1 ] ] + a[ [ -1 ] ])/(2(k - n)) ], k++; a = Append[ a, Prime[ k ] ]; a = Drop[ a, 1 ] ]; b = Append[ b, k - n ], {n, 0, 75} ]; b
PROG
(PARI) { default(primelimit, 4294965247); for (n=0, 1000, b=0; k=n; while(b==0, k++; if ((prime(k-n) + prime(k+n)) % (2*k) == 0, b=1)); write("b066836.txt", n, " ", k) ) } \\ Harry J. Smith, Mar 31 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jan 20 2002
STATUS
approved