OFFSET
3,1
LINKS
Robert Israel, Table of n, a(n) for n = 3..10000
EXAMPLE
a(4) = 19 because 19 is prime, the next 3 primes == 19 (mod 4) are 23, 31 and 43, and (19+23+31+43)/4 = 29 is prime.
MAPLE
f:= proc(n) local p, q, k, s, count;
p:= 1;
do
p:= nextprime(p);
if n mod p = 0 then next fi;
s:= p; count:= 1;
for q from p+n by n while count < n do
if isprime(q) then s:= s+q; count:= count+1 fi
od;
if isprime(s/n) then return p fi
od
end proc:
map(f, [$3..100]);
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Aug 05 2022
STATUS
approved