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-3 of 3 results.

A090657 Triangle read by rows: T(n,k) = number of functions from [1,2,...,n] to [1,2,...,n] such that the image contains exactly k elements (0<=k<=n).

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 0, 3, 18, 6, 0, 4, 84, 144, 24, 0, 5, 300, 1500, 1200, 120, 0, 6, 930, 10800, 23400, 10800, 720, 0, 7, 2646, 63210, 294000, 352800, 105840, 5040, 0, 8, 7112, 324576, 2857680, 7056000, 5362560, 1128960, 40320
Offset: 0

Views

Author

Philippe Deléham, Dec 14 2003

Keywords

Comments

Another version is in A101817. - Philippe Deléham, Feb 16 2013

Examples

			Triangle begins:
  1;
  0,  1;
  0,  2,   2;
  0,  3,  18,   6;
  0,  4,  84, 144, 24;
  ...
		

Crossrefs

Row sums give: A000312. Columns k=0-2 give: A000007, A001477, A068605. Diagonal, lower diagonal give: A000142, A001804. Cf. A007318, A048993, A019538, A008279.

Programs

  • Maple
    T:= proc(n,k) option remember;
          if k=n then n!
        elif k=0 or k>n then 0
        else n * (T(n-1,k-1) + k/(n-k) * T(n-1,k))
          fi
        end:
    seq(seq(T(n,k), k=0..n), n=0..10);
  • Mathematica
    Table[Table[StirlingS2[n, k] Binomial[n, k] k!, {k, 0, n}], {n, 0,10}] // Flatten  (* Geoffrey Critzer, Sep 09 2011 *)

Formula

T(n,k) = C(n,k) * k! * A048993(n,k).
T(n,k) = A008279(n,k) * A048993(n,k).
T(n,k) = C(n,k) * A019538(n, k).
T(n,k) = C(n,k) * Sum_{j=0..k} (-1)^(k-j) * C(k,j) * j^n.
T(n,k) = n * (T(n-1,k-1) + k/(n-k) * T(n-1,k)) with T(n,n) = n! and T(n,0) = 0 for n>0.
T(2n,n) = A288312(n). - Alois P. Heinz, Jun 07 2017

Extensions

Revised description from Jan Maciak, Apr 25 2004
Edited by Alois P. Heinz, Jan 17 2011

A362685 Triangle of numbers read by rows, T(n, k) = (n*(n-1))*Stirling2(k, 2), for n >= 1 and 1 <= k <= n.

Original entry on oeis.org

0, 0, 2, 0, 6, 18, 0, 12, 36, 84, 0, 20, 60, 140, 300, 0, 30, 90, 210, 450, 930, 0, 42, 126, 294, 630, 1302, 2646, 0, 56, 168, 392, 840, 1736, 3528, 7112, 0, 72, 216, 504, 1080, 2232, 4536, 9144, 18360, 0, 90, 270, 630, 1350, 2790, 5670, 11430, 22950, 45990
Offset: 1

Views

Author

Keywords

Comments

T(n, k) is the number of ways to distribute k labeled items into n labeled boxes so that there are exactly 2 nonempty boxes.

Examples

			n\k   1      2       3      4      5      6      7
1:    0
2:    0      2
3:    0      6      18
4:    0     12      36     84
5:    0     20      60    140    300
6:    0     30      90    210    450    930
7:    0     42     126    294    630   1302   2646
  ...
T(4,2) = 12: {1}{2}{}{} (12 ways).
T(4,3) = 36: {12}{3}{}{} (36 ways).
T(4,4) = 84: {123}{4}{}{} (84 ways).
		

Crossrefs

Cf. A002024 (case L=1), A068605 (right diagonal).

Programs

  • Maple
    L := 2: T := (n, k) -> pochhammer(-n, L)*Stirling2(k, L)*((-1)^L):
    seq(seq(T(n, k), k = 1..n), n = 1..10);
  • Python
    from math import isqrt, comb
    from sympy.functions.combinatorial.numbers import stirling
    def A362685(n): return (a:=(m:=isqrt(k:=n<<1))+(k>m*(m+1)))*(a-1)*stirling(n-comb(a,2),2) # Chai Wah Wu, Jun 20 2025

Formula

T(n, k) = (n!/(n - L)!) * Stirling2(k, L) with L = 2, T(1, 1) = 0.

A362791 Triangle of numbers read by rows, T(n, k) = (n*(n-1)*(n-2))*Stirling2(k, 3), for n >= 1 and 1 <= k <= n.

Original entry on oeis.org

0, 0, 0, 0, 0, 6, 0, 0, 24, 144, 0, 0, 60, 360, 1500, 0, 0, 120, 720, 3000, 10800, 0, 0, 210, 1260, 5250, 18900, 63210, 0, 0, 336, 2016, 8400, 30240, 101136, 324576, 0, 0, 504, 3024, 12600, 45360, 151704, 486864, 1524600, 0, 0, 720, 4320, 18000, 64800, 216720, 695520, 2178000, 6717600
Offset: 1

Views

Author

Keywords

Comments

T(n, k) is the number of ways to distribute k labeled items into n labeled boxes so that there are exactly 3 nonempty boxes.

Examples

			n\k   1      2      3      4      5      6      7
1:    0
2:    0      0
3:    0      0      6
4:    0      0     24    144
5:    0      0     60    360   1500
6:    0      0    120    720   3000  10800
7:    0      0    210   1260   5250  18900  63210
  ...
T(4,3) = 24:  {1}{2}{3}{} (24 ways).
T(4,4) = 144: {12}{3}{4}{} (144 ways).
		

Crossrefs

Cf. A002024 (case L=1), A362685 (case L=2), A068605 (right diagonal).

Programs

  • Maple
    L := 3: T := (n, k) -> pochhammer(-n, L)*Stirling2(k, L)*((-1)^L):
    seq(seq(T(n, k), k = 1..n), n = 1..10);
  • Python
    from math import isqrt, comb
    from sympy.functions.combinatorial.numbers import stirling
    def A362791(n): return (a:=(m:=isqrt(k:=n<<1))+(k>m*(m+1)))*(a-1)*(a-2)*stirling(n-comb(a,2),3) # Chai Wah Wu, Jun 20 2025

Formula

T(n, k) = (n!/(n - L)!) * Stirling2(k, L) with L = 3, T(1,1)=T(2,1)=T(2,2) = 0.
Showing 1-3 of 3 results.