A372843 a(n) is the number of parking functions of order n for which the third spot is lucky.
9, 74, 783, 10266, 161221, 2955366, 61999923, 1465709426, 38566299393, 1118106929358, 35418344328439, 1217218474871946, 45110603328226845, 1793457963809111030, 76142854603540048059, 3438379224329923355106, 164560036770068513241817, 8320827788575162428573342
Offset: 3
Keywords
Examples
For clarity, we write parentheses around parking functions. For n = 3, the a(3) = 9 solutions are the parking functions of length 3 with a lucky third spot: (1,1,3),(1,2,3),(1,3,1),(1,3,2),(2,1,3),(2,3,1),(3,1,1),(3,1,2),(3,2,1). There are 7 parking functions of length 3 which do not have a lucky third spot: (1,1,1),(1,1,2),(1,2,1),(1,2,2),(2,1,1),(2,1,2),(2,2,1). For all of these, the car which parks in the third spot did not prefer the third spot; these parking functions do not contribute to our count.
Links
- Steve Butler, Kimberly Hadaway, Victoria Lenius, Preston Martens, and Marshall Moats, Lucky cars and lucky spots in parking functions, arXiv:2412.07873 [math.CO], 2024. See p. 10.
Crossrefs
Programs
-
Mathematica
a[n_]:=(2/3)*(n+1)^(n-1)-(1/3)*(2n-1)*(n-2)^(n-2); Array[a,18,3] (* Stefano Spezia, Jun 26 2024 *)
-
Python
def A372843(n): return (((n+1)**(n-1)<<1)-((n<<1)-1)*(n-2)**(n-2))//3 # Chai Wah Wu, Jun 26 2024
Formula
a(n) = (2/3)*(n+1)^(n-1) - (1/3)*(2*n-1)*(n-2)^(n-2).
Comments