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.

A386877 Triangle read by rows: T(n, k) = n! / (k! * (n/k)!) if k divides n otherwise 0; T(n, 0) = 0^n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 6, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 60, 60, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 840, 0, 840, 0, 0, 0, 1, 0, 1, 0, 10080, 0, 0, 0, 0, 0, 1, 0, 1, 15120, 0, 0, 15120, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Peter Bala and Peter Luschny, Aug 09 2025

Keywords

Examples

			Triangle starts:
  [ 0] [1]
  [ 1] [0, 1]
  [ 2] [0, 1,     1]
  [ 3] [0, 1,     0,     1]
  [ 4] [0, 1,     6,     0,   1]
  [ 5] [0, 1,     0,     0,   0,     1]
  [ 6] [0, 1,    60,    60,   0,     0, 1]
  [ 7] [0, 1,     0,     0,   0,     0, 0, 1]
  [ 8] [0, 1,   840,     0, 840,     0, 0, 0, 1]
  [ 9] [0, 1,     0, 10080,   0,     0, 0, 0, 0, 1]
  [10] [0, 1, 15120,     0,   0, 15120, 0, 0, 0, 0, 1]
  [11] [0, 1,     0,     0,   0,     0, 0, 0, 0, 0, 0, 1]
		

Crossrefs

Cf. A121860 (row sums), A113704 (sign).

Programs

  • Mathematica
    A386877[n_, k_] := Which[k == 0, Boole[n == 0], Divisible[n, k], n!/(k!*(n/k)!), True, 0];
    Table[A386877[n, k], {n, 0, 12}, {k, 0, n}] (* Paolo Xausa, Aug 09 2025 *)
  • SageMath
    F = factorial
    def T(n, k):
        if k == 0: return 0**n
        return F(n)/(F(k)*F(n//k)) if k.divides(n) else 0
    for n in range(33): print([T(n,k) for k in srange(n+1)])

Formula

sign(T(n, k)) = A113704(n, k).