OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..5000
EXAMPLE
a(1) = 2 because prime(1)=2 divides (prime(2)+prime(3))/2 = (3+5)/2 = 4.
MAPLE
a:= proc(n) local m, pn; pn:= ithprime(n);
for m from n+1 while not irem((ithprime(m)+ithprime(m+1))/2, pn)=0
do od; m
end:
seq(a(n), n=1..80); # Alois P. Heinz, Mar 02 2011
MATHEMATICA
leastM[n_]:=Module[{m=1}, While[!Divisible[(Prime[m]+Prime[m+1])/2, n], m++]; m]; leastM/@Prime[Range[60]] (* Harvey P. Dale, Mar 04 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Mar 02 2011
STATUS
approved