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.

Showing 1-4 of 4 results.

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

Views

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

A379611 Table read by rows: T(n, k) = (n + 1)^(n - 1) - (k - 1)*(n + 1)^(n - 2), by convention T(1, 0) = 1.

Original entry on oeis.org

2, 1, 1, 4, 3, 2, 20, 16, 12, 8, 150, 125, 100, 75, 50, 1512, 1296, 1080, 864, 648, 432, 19208, 16807, 14406, 12005, 9604, 7203, 4802, 294912, 262144, 229376, 196608, 163840, 131072, 98304, 65536, 5314410, 4782969, 4251528, 3720087, 3188646, 2657205, 2125764, 1594323, 1062882
Offset: 0

Views

Author

Peter Luschny, Dec 27 2024

Keywords

Examples

			Triangle starts:
  [0]      2;
  [1]      1,      1;
  [2]      4,      3,      2;
  [3]     20,     16,     12,      8;
  [4]    150,    125,    100,     75,     50;
  [5]   1512,   1296,   1080,    864,    648,    432;
  [6]  19208,  16807,  14406,  12005,   9604,   7203,  4802;
  [7] 294912, 262144, 229376, 196608, 163840, 131072, 98304, 65536;
		

Crossrefs

Cf. A007334 (main diagonal), A374756, A375616, A379612 (column 0), A379613.

Programs

  • Maple
    T := (n, k) -> ifelse(n=1 and k=0, 1, (n + 1)^(n - 1) - (k - 1)*(n + 1)^(n - 2)):
  • Mathematica
    T[n_, k_] := T[n, k] = (n + 1)^(n - 1) - (k - 1)*(n + 1)^(n - 2); T[1, 0] := 1;
    Flatten@ Table[T[n, k], {n, 0, 8}, {k, 0, n}] (* Michael De Vlieger, Dec 27 2024 *)

Formula

T(n, k) = (n + 1)^(n - 2)*(n - k + 2), if (n, k) != (1, 0).
T(n, k) = (1 - (k - 1)/(n + 1))*(n + 1)^(n - 1), if (n, k) != (1, 0).

A379613 a(n) = n^(n - 1) - 2*(n + 1)^(n - 2), by convention a(0) = 0.

Original entry on oeis.org

0, 0, 0, 1, 14, 193, 2974, 52113, 1034270, 23046721, 571282238, 15617863897, 467291386990, 15198954783153, 534222097472894, 20185726770649633, 816165851488045118, 35167910642711951617, 1609028732603454196606, 77912950297911241532841, 3981118415206568940420878
Offset: 0

Views

Author

Peter Luschny, Dec 27 2024

Keywords

Crossrefs

Programs

  • Magma
    A379613:= func< n | n eq 0 select 0 else n^(n-1) -2*(n+1)^(n-2) >;
    [A379613(n): n in [0..30]]; // G. C. Greubel, Mar 19 2025
    
  • Maple
    a := n -> ifelse(n = 0, 0, n^(n-1) - 2*(n+1)^(n-2)): seq(a(n), n = 0..20);
  • Mathematica
    {0}~Join~Table[n^(n - 1) - 2*(n + 1)^(n - 2), {n, 20}] (* Michael De Vlieger, Dec 27 2024 *)
  • SageMath
    def A379613(n): return 0 if n==0 else n^(n-1) -2*(n+1)^(n-2)
    print([A379613(n) for n in range(31)]) # G. C. Greubel, Mar 19 2025

Formula

a(n) = A000169(n) - A007334(n+1) for n > 0. In the context of parking functions this is the difference between the main diagonals of A374756 and A379611. See corollary 3.1 and Table 2 in Butler et al.
E.g.f.: (1/(4*x))*((2*W(-x) + 2 - x)^2 - (4 - 12*x + x^2)), W(x) = Lambert W function. - G. C. Greubel, Mar 19 2025

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

Views

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.
Showing 1-4 of 4 results.