OFFSET
1,1
EXAMPLE
nextprime[a(9)]-a(9)=9587-9551=36=4.9
MATHEMATICA
{m=4, r=3}; f[x_] := (Prime[x+1]-Prime[x])/m t=Table[0, {100}]; Do[s=f[n]; s1=Mod[Prime[n+1], m]; If[IntegerQ[s]&&Equal[s1, r]&&s<101&&t[[s]]==0, t[[s]]=Prime[n]], {n, 1, 1000000}]; t
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Apr 14 2003
STATUS
approved