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.

A370832 Triangle read by rows: T(n,k) gives the number of parking functions of size n with k lucky cars. 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 2, 8, 6, 0, 6, 37, 58, 24, 0, 24, 204, 504, 444, 120, 0, 120, 1318, 4553, 6388, 3708, 720, 0, 720, 9792, 44176, 87296, 81136, 33984, 5040, 0, 5040, 82332, 463860, 1203921, 1582236, 1064124, 341136, 40320, 0, 40320, 773280, 5270480, 17164320, 29724000, 28328480, 14602320, 3733920, 362880
Offset: 0

Views

Author

Peter Kagey, Mar 02 2024

Keywords

Comments

A car is called "lucky" if it gets its preferred parking spot.
Closely related to A220884.

Examples

			Table begins:
n\k|  0     1     2      3       4       5       6      7     8
---+-------------------------------------------------------------
 0 |  1
 1 |  0     1
 2 |  0     1     2
 3 |  0     2     8      6
 4 |  0     6    37     58      24
 5 |  0    24   204    504     444     120
 6 |  0   120  1318   4553    6388    3708     720
 7 |  0   720  9792  44176   87296   81136   33984   5040
 8 |  0  5040 82332 463860 1203921 1582236 1064124 341136 40320
      ...
		

Crossrefs

Row sums give A000272(n+1).
Cf. A000142 (main diagonal and column k=1 shifted).

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          expand(x*mul((n+1-k)+k*x, k=2..n)))
        end:
    T:= (n, k)-> coeff(b(n), x, k):
    seq(seq(T(n,k), k=0..n), n=0..10);  # Alois P. Heinz, Jun 26 2024
  • Mathematica
    row[n_] := (x (x - 1)^n Pochhammer[(n + x) / (x - 1), n]) / (n + x);
    Table[CoefficientList[Series[row[n], {x, 0, n}], x], {n, 0, 8}] // Flatten
    (* Peter Luschny, Jun 27 2024 *)

Formula

T(n, n) = n!.
T(n, 1) = (n-1)!.
Sum_{k=1..n} T(n, k) = (n+1)^(n-1).
T(n+1, n) = A002538(n).
G.f. for row n>0: x * Product_{j=2..n} (n + 1 + j*(x-1)).
T(n, k) = [x^k] (x*(x - 1)^n*Pochhammer((n + x) / (x - 1), n)) / (n + x). - Peter Luschny, Jun 27 2024

Extensions

Edited by Alois P. Heinz, Jun 26 2024