cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A374959 a(n) is the least k such that binomial(A349958(n), k) is a multiple of n.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jul 25 2024

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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