OFFSET
1,1
LINKS
Remi Eismann, Table of n, a(n) for n = 1..10000
EXAMPLE
13 = 11 + 11 mod 3 = 11 + 11 mod 9, level = 3
701 = 691 + 691 mod 227 = 691 + 691 mod 681, level = 3
6907 = 6899 + 6899 mod 2297 = 6899 + 6899 mod 6891, level = 3
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@327, h@# == 3 &] (* 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
STATUS
approved