OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..5000
MAPLE
P:= 7: V:= [3, 0, 3, 1]: R:= NULL:
for n from 2 to 50000 do
P:= nextprime(P);
V:= [V[2], V[3], V[4], P+n+3 mod 5];
if V = [0, 0, 0, 0] then R:= R, n fi;
od:
R; # Robert Israel, Sep 13 2020
MATHEMATICA
Select[Range[60000], Mod[Prime[ # ]+#, 5]+Mod[Prime[ #+1]+#+1, 5]+Mod[Prime[ #+2]+#+2, 5]+Mod[Prime[ #+3]+#+3, 5]==0&]
SequencePosition[Table[If[Divisible[n+Prime[n], 5], 1, 0], {n, 50000}], {1, 1, 1, 1}][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 12 2018 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Zak Seidov, Jun 10 2005
STATUS
approved