A383505 Least integer k >= 0 such that binomial(k*n,k+1) = -1 mod n, or -1 if no such integer exists.
0, 1, 2, 3, 4, 341, 6, 79, 8, 19599, 10, 3937027727, 12, 2841, 22679, 47, 16, 18459448019, 18, 179, 146, 4003647, 22, 77934182399, 24, 299519, 80, 29952579, 28
Offset: 1
Examples
a(6) = 341 because binomial(341*6, 341+1) = 5 mod 6, and no smaller nonnegative integer satisfies this.
Links
- Max Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems: Binomial coefficients modulo integers (binomod.gp).
Programs
-
Mathematica
f = {}; Do[k = 0; While[! Mod[Binomial[k*n, k + 1], n] == n - 1, k++]; f = Join[f, {k}], {n, 1, 11}]
-
PARI
a(n) = my(k=0); while (binomod(k*n,k+1, n) != Mod(-1, n), k++); k; \\ Michel Marcus, May 10 2025
Formula
If p is prime, then a(p) = p-1 by Lucas' theorem. - Chai Wah Wu, Jul 21 2025
Extensions
a(12) from Chai Wah Wu, Jul 21 2025
a(18), a(22), a(24), a(26), a(28) from Max Alekseyev, Jul 24 2025
Comments