OFFSET
1,1
COMMENTS
LINKS
Remi Eismann, Table of n, a(n) for n=1..10000
FORMULA
A117078 : a(n) = smallest k such that prime(n+1) = prime(n) + (prime(n) mod k), or 0 if no such k exists. prime(n) for which k=7.
MATHEMATICA
f[n_] := Block[{a, p = Prime[n], np = Prime[n + 1]}, a = Min[Select[Divisors[2*p - np], #1 > np - p & ]]; If[a == Infinity, 0, a]]; Prime@ Select[ Range@695, f@# == 7 &] (* Robert G. Wilson v, May 26 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémi Eismann, May 22 2006; May 27 2006; May 04 2007
EXTENSIONS
More terms from Robert G. Wilson v, May 26 2006
STATUS
approved