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.

User: Kimberly P. Hadaway

Kimberly P. Hadaway's wiki page.

Kimberly P. Hadaway has authored 7 sequences.

A375616 a(n) is the number of lucky cars in all parking functions of order n.

Original entry on oeis.org

0, 1, 5, 36, 350, 4320, 64827, 1146880, 23383404, 540000000, 13933327265, 397303087104, 12407264266410, 421154777645056, 15439814208984375, 607985949695016960, 25593429637028941208, 1146928904801167933440, 54515427164280400691709, 2739404800000000000000000
Offset: 0

Author

Kimberly P. Hadaway, Aug 21 2024, suggested by Andrew Howroyd

Keywords

Comments

This sequence enumerates lucky cars in parking functions of order n (where a lucky spot is one which is parked in by a car which prefers that spot).

Crossrefs

Row sums of A374756.
Cf. A370832.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          expand(x*mul((n+1-k)+k*x, k=2..n)))
        end:
    a:= n-> add(k*coeff(b(n), x, k), k=1..n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Aug 21 2024
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Expand[x*Product[(n+1-k) + k*x, {k, 2, n}]]];
    a[n_] := Sum[k*Coefficient[b[n], x, k], {k, 1, n}];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Aug 31 2024, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=1..n} k*A370832(n,k) = Sum_{k=1..n} A374756(n,k).

Extensions

a(6)-a(19) from Alois P. Heinz, Aug 21 2024

A374533 a(n) is the number of parking functions of order n where the (n-1)-st spot is lucky.

Original entry on oeis.org

3, 11, 74, 708, 8733, 131632, 2342820, 48068672, 1116809255
Offset: 2

Author

Kimberly P. Hadaway, Jul 10 2024

Keywords

Comments

This sequence enumerates parking functions with lucky penultimate 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 = 3, the a(3) = 11 solutions are the parking functions of length 3 with a lucky second spot: (1,2,1),(1,2,2),(1,2,3),(1,3,2),(2,1,1),(2,1,2),(2,1,3),(2,2,1),(2,3,1),(3,1,2),(3,2,1). There are 5 parking functions of length 3 which do not have a lucky second spot: (1,1,1),(1,1,2),(1,1,3),(1,3,1),(3,1,1). For all of these, the car which parks in the second spot did not prefer the second spot; these parking functions do not contribute to our count.
		

Crossrefs

Second diagonal of A374756.

A374756 Triangle read by rows: T(n,k) is the number of parking functions of order n where the k-th car is lucky.

Original entry on oeis.org

1, 3, 2, 16, 11, 9, 125, 87, 74, 64, 1296, 908, 783, 708, 625, 16807, 11824, 10266, 9421, 8733, 7776, 262144, 184944, 161221, 148992, 140298, 131632, 4782969, 3381341, 2955366, 2742090, 2600879, 2480787, 100000000, 70805696, 61999923, 57671104, 54921875, 52779840, 2357947691, 1671605646, 1465709426, 1365730231, 1303885965, 1258181726
Offset: 1

Author

Kimberly P. Hadaway, Jul 18 2024

Keywords

Comments

This sequence enumerates parking functions with n cars and n parking spots with lucky k-th spot (where a lucky spot is one which is parked in by a car which prefers that spot).

Examples

			Triangle begins:
      1;
      3,     2;
     16,    11,     9;
    125,    87,    74,   64;
   1296,   908,   783,  708,  625;
  16807, 11824, 10266, 9421, 8733, 7776;
  ...
For clarity, we write parentheses around parking functions. For n = 3 and k = n-1 = 2, the T(3,2) = 11 solutions are the parking functions of length 3 with a lucky second spot: (1,2,1),(1,2,2),(1,2,3),(1,3,2),(2,1,1),(2,1,2),(2,1,3),(2,2,1),(2,3,1),(3,1,2),(3,2,1). There are 5 parking functions of length 3 which do not have a lucky second spot: (1,1,1),(1,1,2),(1,1,3),(1,3,1),(3,1,1). For all of these, the car which parks in the second spot did not prefer the second spot; these parking functions do not contribute to our count.
		

Crossrefs

Cf. A000169 (leading diagonal), A374533 (second diagonal).
Columns k = 1..5: A000272, A372842, A372843, A372844, A372845.
Cf. A370832.

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

Original entry on oeis.org

9, 74, 783, 10266, 161221, 2955366, 61999923, 1465709426, 38566299393, 1118106929358, 35418344328439, 1217218474871946, 45110603328226845, 1793457963809111030, 76142854603540048059, 3438379224329923355106, 164560036770068513241817, 8320827788575162428573342
Offset: 3

Author

Kimberly P. Hadaway, Jun 26 2024

Keywords

Comments

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).

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.
		

Crossrefs

Cf. A000272 (for first spot), A372842 (for second spot), A372844 (for fourth spot), and A372845 (for fifth spot).

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).

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

Original entry on oeis.org

64, 708, 9421, 148992, 2742090, 57671104, 1365730231, 35980443648, 1044117402868, 33098695234560, 1138160856018369, 42200676331159552, 1678427133899138494, 71282668099352051712, 3219814814790580711915, 154137012617228775849984, 7795444201708762192584744, 415337944634097426474729472
Offset: 4

Author

Kimberly P. Hadaway, Jun 26 2024

Keywords

Comments

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 = 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.
		

Crossrefs

Cf. A000272 (for first spot), A372842 (for second spot), A372843 (for third spot), and A372845 (for fifth spot).

Programs

  • 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 *)
  • 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

Formula

a(n) = (5/8)*(n+1)^(n-1) - (1/8)*(13*n^2 - 26*n + 9)*(n-3)^(n-3).

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

Original entry on oeis.org

625, 8733, 140298, 2600879, 54921875, 1303885965, 34409008596, 999711522899, 31719176377701, 1091467041015625, 40491113522829630, 1611131116280526327, 68448950529246552887, 3092734133786108912869, 148090628302001953125000, 7491257174986774088059995, 399205026805287676036911049
Offset: 5

Author

Kimberly P. Hadaway, Jun 26 2024

Keywords

Comments

This sequence enumerates parking functions with lucky fifth 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 = 6, there are a(6) = 8733 solutions. An example of a parking function of order 6 with a lucky fifth spot is (1,4,1,5,2,2); here, the fourth car parks in the fifth spot which is its preferred spot. This parking function contributes to our count. A non-example is the parking function (1,1,1,1,1,5); here, the fifth car parks in the fifth spot, but its preference is spot 1. This parking function does not contribute to our count.
		

Crossrefs

Cf. A000272 (for first spot), A372842 (for second spot), A372843 (for third spot), and A372844 (for fourth spot).

Programs

  • Mathematica
    a[n_]:=(3/5)*(n+1)^(n-1)-(1/30)*(118*n^3-531*n^2+659*n-192)*(n-4)^(n-4); Array[a,17,5] (* Stefano Spezia, Jun 26 2024 *)
  • Python
    def A372845(n): return (18*(n+1)**(n-1)-(n*(n*(59*((n<<1)-9))+659)-192)*(n-4)**(n-4))//30 # Chai Wah Wu, Jun 26 2024

Formula

a(n) = (3/5)*(n+1)^(n-1) - (1/30)*(118*n^3 - 531*n^2 + 659*n - 192)*(n-4)^(n-4).

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

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).