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.

A372842 a(n) is the number of parking functions of order n for which the second spot is lucky.

Original entry on oeis.org

2, 11, 87, 908, 11824, 184944, 3381341, 70805696, 1671605646, 43938023168, 1272792377875, 40291409169408, 1383927524621468, 51265193822056448, 2037343816037147001, 86467962304018300928, 3903480077867017448410, 186771397981175865606144, 9441767566333191196904591
Offset: 2

Views

Author

Kimberly P. Hadaway, Jun 20 2024

Keywords

Comments

This sequence enumerates parking functions with lucky second spot (where a lucky spot is one which is parked in by a car which prefers that spot).

Examples

			For clarity, we write parentheses around parking functions. For n = 2, the a(2) = 2 solutions are the parking functions of length 2 with a lucky second spot are (1,2) and (2,1). The parking function (1,1) is not one of the solutions because the car which parks in the second spot did not prefer the second spot; this parking function does not contribute to our count.
		

Crossrefs

Cf. A000272 (for first spot), A372843 (for third spot), A372844 (for fourth spot), and A372845 (for fifth spot).

Programs

  • Mathematica
    Array[(3/4)*(# + 1)^(# - 1) - (1/4)*(# - 1)^(# - 1) &, 19, 2] (* Michael De Vlieger, Jun 26 2024 *)
  • Python
    def A372842(n): return 3*(n+1)**(n-1)-(n-1)**(n-1)>>2 # Chai Wah Wu, Jun 26 2024

Formula

a(n) = (3/4)*(n+1)^(n-1) - (1/4)*(n-1)^(n-1).