OFFSET
1,1
LINKS
Remi Eismann, Table of n, a(n) for n=1..10000
EXAMPLE
19=17+17 mod(3)=17+17 mod(15), level=5
157=151+151 mod(29)=151+151 mod(145) level=5
2203=2179+2179 mod(431)=2179+2179 mod(2155), level=5
MATHEMATICA
f[n_] := Block[{d, j = 2, p = Prime@n}, d = Prime[n + 1] - p; While[j < p && Mod[p, j] != d, j++ ]; If[j == p, 0, j]]; g[n_] := Block[{d, k = p = Prime@n}, d = Prime[n + 1] - p; While[k > 0 && Mod[p, k] != d, k-- ]; If[k == 0, 0, k]]; h[n_] := Block[{a = f@n, b = g@n}, If[a == 0, 0, b/a]]; Prime@Select[ Range@763, h@# == 5 &] (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémi Eismann, May 02 2006
EXTENSIONS
More terms from Robert G. Wilson v, May 06 2006
Edited by N. J. A. Sloane, May 14 2006
STATUS
approved