OFFSET
1,2
EXAMPLE
MAPLE
f:= proc(n) local V, q, r;
V:= Array(0..n-1); q:= 4;
do
q:= nextprime(q);
r:= q mod n;
if V[r] = 0 then V[r]:= q
else return V[r]
fi
od
end proc:
Recs:= 1: r:= 5:
for n from 2 to 20000 do
rn:= f(n);
if rn > r then Recs:= Recs, n; r:= rn fi
od:
Recs;
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Robert Israel, Jul 24 2018
EXTENSIONS
a(19)-a(28) from Michael S. Branicky, Jun 25 2024
STATUS
approved