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.

Showing 1-2 of 2 results.

A094495 Table of binomial coefficients mod m^2, read by rows: T(m, n) = binomial(m, n) mod m^2.

Original entry on oeis.org

0, 0, 0, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1, 1, 6, 15, 20, 15, 6, 1, 1, 7, 21, 35, 35, 21, 7, 1, 1, 8, 28, 56, 6, 56, 28, 8, 1, 1, 9, 36, 3, 45, 45, 3, 36, 9, 1, 1, 10, 45, 20, 10, 52, 10, 20, 45, 10, 1, 1, 11, 55, 44, 88, 99, 99, 88, 44, 55, 11, 1, 1, 12, 66, 76, 63, 72, 60, 72, 63, 76, 66, 12, 1
Offset: 0

Views

Author

Labos Elemer, Jun 02 2004

Keywords

Comments

a(0) = 0 by convention.

Examples

			First deviation from A007318 is at a(40) = T(8,4) because binomial(8,4)=70 and 70 mod 64 = 6.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Table[Mod[Binomial[n, j], n^2], {j, 0, n}], {n, 1, 20}], 1]
  • PARI
    T(m,n)=binomial(m,n)%m^2 \\ Charles R Greathouse IV, Jul 29 2014
    
  • Python
    from math import comb, isqrt
    def A094495(n): return comb(r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)),n-comb(r+1,2))%(r**2) if n else 0 # Chai Wah Wu, Apr 30 2025

A094497 Triangular table A(n,j) = C(n,j) - C(n,j) mod n^3, difference of binomial coefficient and its residue mod n^3, read by rows.

Original entry on oeis.org

1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2744, 2744, 2744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3375, 3375, 3375, 3375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4096, 4096, 8192, 12288, 8192, 4096, 4096
Offset: 0

Views

Author

Labos Elemer, Jun 02 2004

Keywords

Comments

a(0) = 1 by convention.

Examples

			Out of a(1)=1 and a(2)=1, the first deviation from A007318 is at a(111) because C(14,6) = 3003, 3003 mod 2744 = 259, a(111) = 2744.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Table[Binomial[n, j]-Mod[Binomial[n, j], n^3], {j, 0, n}], {n, 1, 14}], 1]
Showing 1-2 of 2 results.