OFFSET
1,1
COMMENTS
Each cluster of candidates is about e (2.71828...) times as large as the previous one.
EXAMPLE
The average of prime(6-1) = 11 and prime(6) = 13 is 12, which is divisible by 6, so 6 is a term of the sequence.
MATHEMATICA
a = 1; b = 2; Do[ b = Prime[ n ]; If[ IntegerQ[ (a + b)/(2n) ], Print[ n ] ]; a = b, {n, 1, 2*10^8} ]
With[{nn=30000000}, Last[#]&/@Select[Thread[{Partition[Prime[Range[nn]], 2, 1], Range[2, nn]}], Divisible[ Mean[First[#]], Last[#]]&]] (* Harvey P. Dale, Oct 21 2011 *) (* The program takes a long time to generate the first 22 terms of the sequence; to generate them all, by increasing nn, may overwhelm computer resources and operator patience *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jan 20 2002
EXTENSIONS
a(29)-a(31) from D. S. McNeil, Oct 22 2011
STATUS
approved