

A061243


a(n) = n+r where r is the smallest number such that n divides (n+1)(n+2)(n+3)...(n+r).


3



2, 4, 6, 8, 10, 9, 14, 12, 15, 15, 22, 16, 26, 21, 20, 22, 34, 24, 38, 25, 28, 33, 46, 28, 35, 39, 36, 35, 58, 35, 62, 40, 44, 51, 42, 42, 74, 57, 52, 45, 82, 49, 86, 55, 51, 69, 94, 54, 63, 60, 68, 65, 106, 63, 66, 63, 76, 87, 118, 65, 122, 93, 70, 72, 78, 77, 134, 85, 92
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

It is conjectured that a(n) = n + A002034(n).
Dean Hickerson remarks (Oct 07 2001) that the above conjecture is easy to prove: (n+1)(n+2)...(n+r) is congruent to r! (mod n), so n divides (n+1)(n+2)...(n+r) if and only if n divides r!.


LINKS



FORMULA



EXAMPLE

a(6) = 9 as 6 divides 7 * 8 * 9 but does not divide 7 * 8.


MATHEMATICA

a[n_] := For[r=1, True, r++, If[Mod[r!, n]==0, Return[n+r]]]


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



