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.

A264902 Number T(n,k) of defective parking functions of length n and defect k; triangle T(n,k), n>=0, 0<=k<=max(0,n-1), read by rows.

Original entry on oeis.org

1, 1, 3, 1, 16, 10, 1, 125, 107, 23, 1, 1296, 1346, 436, 46, 1, 16807, 19917, 8402, 1442, 87, 1, 262144, 341986, 173860, 41070, 4320, 162, 1, 4782969, 6713975, 3924685, 1166083, 176843, 12357, 303, 1, 100000000, 148717762, 96920092, 34268902, 6768184, 710314, 34660, 574, 1
Offset: 0

Views

Author

Alois P. Heinz, Nov 28 2015

Keywords

Examples

			T(2,0) = 3: [1,1], [1,2], [2,1].
T(2,1) = 1: [2,2].
T(3,1) = 10: [1,3,3], [2,2,2], [2,2,3], [2,3,2], [2,3,3], [3,1,3], [3,2,2], [3,2,3], [3,3,1], [3,3,2].
T(3,2) = 1: [3,3,3].
Triangle T(n,k) begins:
0 :       1;
1 :       1;
2 :       3,       1;
3 :      16,      10,       1;
4 :     125,     107,      23,       1;
5 :    1296,    1346,     436,      46,      1;
6 :   16807,   19917,    8402,    1442,     87,     1;
7 :  262144,  341986,  173860,   41070,   4320,   162,   1;
8 : 4782969, 6713975, 3924685, 1166083, 176843, 12357, 303, 1;
    ...
		

Crossrefs

Row sums give A000312.
T(2n,n) gives A264903.

Programs

  • Maple
    S:= (n, k)-> `if`(k=0, n^n, add(binomial(n, i)*k*
                (k+i)^(i-1)*(n-k-i)^(n-i), i=0..n-k)):
    T:= (n, k)-> S(n, k)-S(n, k+1):
    seq(seq(T(n, k), k=0..max(0, n-1)), n=0..10);
  • Mathematica
    S[n_, k_] := If[k==0, n^n, Sum[Binomial[n, i]*k*(k+i)^(i-1)*(n-k-i)^(n-i), {i, 0, n-k}]]; T[n_, k_] := S[n, k]-S[n, k+1]; T[0, 0] = 1; Table[T[n, k], {n, 0, 10}, {k, 0, Max[0, n-1]}] // Flatten (* Jean-François Alcover, Feb 18 2017, translated from Maple *)

Formula

T(n,k) = S(n,k) - S(n,k+1) with S(n,0) = n^n, S(n,k) = Sum_{i=0..n-k} C(n,i) * k*(k+i)^(i-1) * (n-k-i)^(n-i) for k>0.
Sum_{k>0} k * T(n,k) = A036276(n-1) for n>0.
Sum_{k>0} T(n,k) = A101334(n).
Sum_{k>=0} (-1)^k * T(n,k) = A274279(n) for n>=1.

A208248 Sum of the maximum cycle length over all functions f:{1,2,...,n} -> {1,2,...,n} (endofunctions).

Original entry on oeis.org

0, 1, 5, 40, 431, 5826, 94657, 1795900, 38963535, 951398890, 25819760021, 770959012704, 25117397416795, 886626537549130, 33708625339151505, 1373237757290215156, 59677939242566840303, 2755753623830236494930, 134746033233724391374765, 6954962673986411576581000
Offset: 0

Views

Author

Geoffrey Critzer, Jan 12 2013

Keywords

Comments

a(n) is also the sum of the number of endofunctions with at least one cycle >= i for all i >= 1. In other words, a(n) = A000312(n) + A101334(n) + A208240(n) + ... .

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, m, add((j-1)!*
          b(n-j, max(m, j))*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> add(b(j, 0)*n^(n-j)*binomial(n-1, j-1), j=0..n):
    seq(a(n), n=0..20);  # Alois P. Heinz, May 20 2016
  • Mathematica
    nn=20; t=Sum[n^(n-1)x^n/n!, {n,1,nn}]; Apply[Plus, Table[Range[0,nn]! CoefficientList[Series[1/(1-t) - Exp[Sum[t^i/i, {i,1,n}]], {x,0,nn}], x], {n, 0, nn-1}]]

Formula

E.g.f.: Sum_{k>=0} 1/(1-T(x)) - exp(Sum_{i=1...k} T(x)^i/i) = A(T(x)) where A(x) is the e.g.f. for A028418 and T(x) is the e.g.f. for A000169.

A208240 Number of functions f:{1,2,...,n}->{1,2,...,n} with at least one cycle of length >= 3.

Original entry on oeis.org

0, 0, 0, 2, 38, 674, 12824, 269016, 6242116, 159629984, 4474156304, 136638234842, 4521281961800, 161263788956178, 6171136558989856, 252297980348513264, 10978226724737842928, 506678120536777708544, 24726830423666093964224, 1272394054736096884141554
Offset: 0

Views

Author

Geoffrey Critzer, Jan 11 2013

Keywords

Comments

a(n) = n^n - A209319(n). - Vaclav Kotesovec, Oct 09 2013

Crossrefs

Cf. A101334.

Programs

  • Maple
    T:= -LambertW(-x):
    egf:= 1/(1-T) -exp(T +T^2/2):
    a:= n-> n! *coeff(series(egf, x, n+1), x, n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Jan 11 2013
  • Mathematica
    nn=20;t=Sum[n^(n-1)x^n/n!,{n,1,nn}];Range[0,nn]!CoefficientList[Series[1/(1-t)-Exp[Sum[t^i/i,{i,1,2}]],{x,0,nn}],x]

Formula

E.g.f.: 1/(1-T(x)) - exp(T(x) + T(x)^2/2) where T(x) is the e.g.f. for A000169.

A215265 a(n) = (n-1)^(n+1) - n^n.

Original entry on oeis.org

-2, -1, -3, -11, -13, 971, 31469, 856073, 23576391, 686321335, 21381059609, 714688329389, 25606611695675, 981043357956611, 40073886188532741, 1740059447428511761, 80079381261983807759, 3895126220983308449519, 199726027609854787271729, 10769816560735764585313397
Offset: 0

Views

Author

Alex Ratushnyak, Aug 07 2012

Keywords

Comments

0^0 is interpreted as 1.

Examples

			a(3) = 2^4 - 3^3 = 16-27 = -11.
		

Crossrefs

Cf. A064232 is essentially equal to (n-1)^(n+1) mod n^n.

Programs

  • Maple
    A215265 := proc(n)
        (n-1)^(n+1)-n^n ;
    end proc: # R. J. Mathar, Aug 07 2012
  • Mathematica
    Join[{-2},Table[(n-1)^(n+1)-n^n,{n,20}]] (* Harvey P. Dale, May 21 2023 *)
  • Python
    for n in range(33):
        print((n-1)**(n+1) - n**n)

Formula

For n>0, a(n) = A046065(n-1) - A101334(n).
E.g.f.: x/W(-x) - (1+x)/(1+W(-x)) - x/(1+W(-x))^2 + x/(1+W(-x))^3, where W is the Lambert W function. - Robert Israel, Mar 29 2017
Showing 1-4 of 4 results.