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.
%I A372843 #14 Dec 27 2024 08:48:47 %S A372843 9,74,783,10266,161221,2955366,61999923,1465709426,38566299393, %T A372843 1118106929358,35418344328439,1217218474871946,45110603328226845, %U A372843 1793457963809111030,76142854603540048059,3438379224329923355106,164560036770068513241817,8320827788575162428573342 %N A372843 a(n) is the number of parking functions of order n for which the third spot is lucky. %C A372843 This sequence enumerates parking functions with lucky third spot (where a lucky spot is one which is parked in by a car which prefers that spot). %H A372843 Steve Butler, Kimberly Hadaway, Victoria Lenius, Preston Martens, and Marshall Moats, <a href="https://arxiv.org/abs/2412.07873">Lucky cars and lucky spots in parking functions</a>, arXiv:2412.07873 [math.CO], 2024. See p. 10. %F A372843 a(n) = (2/3)*(n+1)^(n-1) - (1/3)*(2*n-1)*(n-2)^(n-2). %e A372843 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. %t A372843 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 *) %o A372843 (Python) %o A372843 def A372843(n): return (((n+1)**(n-1)<<1)-((n<<1)-1)*(n-2)**(n-2))//3 # _Chai Wah Wu_, Jun 26 2024 %Y A372843 Cf. A000272 (for first spot), A372842 (for second spot), A372844 (for fourth spot), and A372845 (for fifth spot). %K A372843 nonn %O A372843 3,1 %A A372843 _Kimberly P. Hadaway_, Jun 26 2024