OFFSET
1,1
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1)=2, since binomial(1+2, 2) mod 2 = 3 mod 2 = 1 and 2 is the minimal number with this property.
a(7)=9 because of binomial(7+9, 9) = 11440 = 1271*9 + 1, but binomial(7+k, k) mod k <> 1 for all numbers < 9.
MATHEMATICA
Table[Block[{m = 1}, While[Mod[Binomial[n + m, m], m] != 1, m++]; m], {n, 98}] (* Michael De Vlieger, Jul 30 2018 *)
PROG
(PARI) a(n) = {my(m = 1, ok = 0); until (ok, if (binomial(n+m, m) % m == 1, ok = 1, m++); ); return (m); } \\ Michel Marcus, Jul 15 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, Oct 20 2007
STATUS
approved