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