login
A374959
a(n) is the least k such that binomial(A349958(n), k) is a multiple of n.
4
0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 3, 2, 4, 1, 3, 1, 2, 1, 2, 1, 3, 1, 1, 3, 2, 3, 2, 1, 4, 2, 3, 1, 3, 1, 3, 2, 8, 1, 5, 1, 2, 2, 6, 1, 4, 2, 3, 2, 2, 1, 3, 1, 2, 4, 1, 4, 4, 1, 2, 6, 4, 1, 5, 1, 2, 2, 4, 5, 2, 1, 3, 1, 2, 1, 3, 3, 4, 3
OFFSET
1,6
EXAMPLE
For n = 12: the first multiple of 12 in Pascal's triangle appears in row 9; this row contains: 1, 9, 36, 84, 126, 126, 84, 36, 9, 1; the first multiple of 12 (36), appears at (0-based) index 2; so a(12) = 2.
PROG
(PARI) a(n) = { my (r = [1 % n], j); for (i = 0, oo, if (vecmin(r, &j)==0, return (j-1), r = (concat(0, r) + concat(r, 0)) % n; ); ); }
(Python)
from math import comb
def A374959(n): return next(k for j in range(n+1) for k in range(j+1) if not (comb(j, k) % n)) # Chai Wah Wu, Jul 30 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jul 25 2024
STATUS
approved