login
A372844
a(n) is the number of parking functions of order n for which the fourth spot is lucky.
5
64, 708, 9421, 148992, 2742090, 57671104, 1365730231, 35980443648, 1044117402868, 33098695234560, 1138160856018369, 42200676331159552, 1678427133899138494, 71282668099352051712, 3219814814790580711915, 154137012617228775849984, 7795444201708762192584744, 415337944634097426474729472
OFFSET
4,1
COMMENTS
A lucky spot is one which is parked in by a car which prefers that spot.
FORMULA
a(n) = (5/8)*(n+1)^(n-1) - (1/8)*(13*n^2 - 26*n + 9)*(n-3)^(n-3).
EXAMPLE
For clarity, we write parentheses around parking functions. For n = 4, there are a(4) = 64 solutions. An example of a parking function of order 4 with a lucky fourth spot is (1,4,2,2); here, the second car parks in the fourth spot which is its preferred spot. This parking function contributes to our count. A non-example is the parking function (1,2,1,2); here, the last car parks in the fourth spot, but its preference is spot 2. This parking function does not contribute to our count.
MATHEMATICA
a[n_]:=(5/8)*(n+1)^(n-1)-(1/8)*(13*n^2-26*n+9)*(n-3)^(n-3); Array[a, 19, 4] (* Stefano Spezia, Jun 26 2024 *)
PROG
(Python)
def A372844(n): return 5*(n+1)**(n-1)-(13*(n-1)**2-4)*(n-3)**(n-3)>>3 # Chai Wah Wu, Jun 26 2024
CROSSREFS
Cf. A000272 (for first spot), A372842 (for second spot), A372843 (for third spot), and A372845 (for fifth spot).
Sequence in context: A318023 A320408 A223963 * A303726 A305229 A304774
KEYWORD
nonn
AUTHOR
Kimberly P. Hadaway, Jun 26 2024
STATUS
approved