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.

This page as a plain text file.
%I A386877 #16 Aug 09 2025 14:54:31
%S A386877 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,
%T A386877 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,
%U A386877 15120,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1
%N A386877 Triangle read by rows: T(n, k) = n! / (k! * (n/k)!) if k divides n otherwise 0; T(n, 0) = 0^n.
%H A386877 Paolo Xausa, <a href="/A386877/b386877.txt">Table of n, a(n) for n = 0..11475</a> (rows 0..150 of triangle, flattened).
%F A386877 sign(T(n, k)) = A113704(n, k).
%e A386877 Triangle starts:
%e A386877   [ 0] [1]
%e A386877   [ 1] [0, 1]
%e A386877   [ 2] [0, 1,     1]
%e A386877   [ 3] [0, 1,     0,     1]
%e A386877   [ 4] [0, 1,     6,     0,   1]
%e A386877   [ 5] [0, 1,     0,     0,   0,     1]
%e A386877   [ 6] [0, 1,    60,    60,   0,     0, 1]
%e A386877   [ 7] [0, 1,     0,     0,   0,     0, 0, 1]
%e A386877   [ 8] [0, 1,   840,     0, 840,     0, 0, 0, 1]
%e A386877   [ 9] [0, 1,     0, 10080,   0,     0, 0, 0, 0, 1]
%e A386877   [10] [0, 1, 15120,     0,   0, 15120, 0, 0, 0, 0, 1]
%e A386877   [11] [0, 1,     0,     0,   0,     0, 0, 0, 0, 0, 0, 1]
%t A386877 A386877[n_, k_] := Which[k == 0, Boole[n == 0], Divisible[n, k], n!/(k!*(n/k)!), True, 0];
%t A386877 Table[A386877[n, k], {n, 0, 12}, {k, 0, n}] (* _Paolo Xausa_, Aug 09 2025 *)
%o A386877 (SageMath)
%o A386877 F = factorial
%o A386877 def T(n, k):
%o A386877     if k == 0: return 0**n
%o A386877     return F(n)/(F(k)*F(n//k)) if k.divides(n) else 0
%o A386877 for n in range(33): print([T(n,k) for k in srange(n+1)])
%Y A386877 Cf. A121860 (row sums), A113704 (sign).
%K A386877 nonn,tabl
%O A386877 0,13
%A A386877 _Peter Bala_ and _Peter Luschny_, Aug 09 2025