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-3 of 3 results.

A145225 Triangle read by rows: T(n,k) is the number of odd permutations (of an n-set) with exactly k fixed points.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 6, 0, 6, 0, 0, 20, 30, 0, 10, 0, 0, 135, 120, 90, 0, 15, 0, 0, 924, 945, 420, 210, 0, 21, 0, 0, 7420, 7392, 3780, 1120, 420, 0, 28, 0, 0, 66744, 66780, 33264, 11340, 2520, 756, 0, 36, 0, 0
Offset: 0

Views

Author

Abdullahi Umar, Oct 10 2008

Keywords

Examples

			Triangle starts:
   0;
   0,  0;
   1,  0, 0;
   0,  3, 0,  0;
   6,  0, 6,  0, 0;
  20, 30, 0, 10, 0, 0;
  ...
		

Crossrefs

Row sums are A001710 for n > 1.
Columns k=0..2 are A000387, A145222, A145223.

Programs

  • Maple
    A145225 := proc(n,k)
        binomial(n,k)*A000387(n-k) ; # re-use code of A000387
    end proc:
    seq(seq(A145225(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Jul 06 2023
  • Mathematica
    A145225[n_, k_] := Binomial[n, k]*Binomial[n - k, 2]*Subfactorial[n - k - 2];
    Table[A145225[n, k], {n, 0, 10}, {k, 0, n}] (* Paolo Xausa, Jan 31 2025 *)

Formula

T(n,k) = C(n,k) * A000387(n-k).
E.g.f.: x^(k+2) * exp(-x) / (2*k!*(1-x)).
T(n,k) + A145224(n,k) = A008290(n,k). - R. J. Mathar, Jul 06 2023
T(n,k) = (A008290(n,k) - A055137(n,k)) / 2. - Julian Hatfield Iacoponi, Aug 08 2024

A145219 a(n) is the number of even permutations (of an n-set) with exactly 1 fixed point.

Original entry on oeis.org

1, 0, 0, 8, 15, 144, 910, 7440, 66717, 667520, 7342236, 88107480, 1145396395, 16035550608, 240533257770, 3848532125984, 65425046139705, 1177650830517120, 22375365779822392, 447507315596451240, 9397653627525472071, 206748379805560390160, 4755212735527888968390
Offset: 1

Views

Author

Abdullahi Umar, Oct 09 2008

Keywords

Examples

			a(4) = 8 because there are exactly 8 even permutations (of a 4-set) having 1 fixed point, namely: (123), (132), (124), (142), (134), (143), (234), (243).
		

Crossrefs

Programs

  • PARI
    x = 'x + O('x^30); Vec(serlaplace((x*(1-x^2/2) * exp(-x))/(1-x))) \\ Michel Marcus, Apr 04 2016

Formula

a(n) = n*A003221(n-1), (n > 0).
E.g.f.: (x*(1-x^2/2) * exp(-x))/(1-x).
D-finite with recurrence (-3*n+7)*a(n) +(n-2)*(3*n-10)*a(n-1) +(9*n-8)*(n-3)*a(n-2) +2*(3*n-2)*(n-2)*a(n-3)=0. - R. J. Mathar, Jul 06 2023

Extensions

More terms from Alois P. Heinz, Nov 19 2013

A145223 a(n) is the number of odd permutations (of an n-set) with exactly 2 fixed points.

Original entry on oeis.org

0, 0, 6, 0, 90, 420, 3780, 33264, 333900, 3670920, 44054010, 572697840, 8017775766, 120266628300, 1924266063720, 32712523068960, 588825415259640, 11187682889909904, 223753657798227150, 4698826813762734240, 103374189902780197170, 2377606367763944481780
Offset: 2

Views

Author

Abdullahi Umar, Oct 09 2008

Keywords

Examples

			a(4) = 6 because there are exactly 6 odd permutations (of a 4-set) having 2 fixed points, namely: (12), (13), (14), (23), (24), (34).
		

Crossrefs

Cf. A000387 (odd permutations with no fixed points), A145222 (odd permutations with exactly 1 fixed point), A145220 (even permutations with exactly 2 fixed points).

Programs

  • Maple
    egf:= x^4 * exp(-x)/(4*(1-x));
    a:= n-> n! * coeff(series(egf, x, n+1), x, n):
    seq(a(n), n=2..30);  # Alois P. Heinz, Feb 01 2011
  • Mathematica
    A000387[n_] := Subfactorial[n-2] Binomial[n, 2];
    a[n_] := (n(n-1)/2) A000387[n-2];
    Table[a[n], {n, 2, 30}] (* Jean-François Alcover, Jan 30 2025 *)
  • PARI
    x = 'x + O('x^30); Vec(serlaplace(((x^4)*exp(-x))/(4*(1-x)))) \\ Michel Marcus, Apr 04 2016

Formula

a(n) = A145225(n,2) = (n*(n-1)/2) * A000387(n-2), (n > 1).
E.g.f.: x^4*exp(-x)/(4*(1-x)).
D-finite with recurrence +(-n+6)*a(n) +(n-2)*(n-7)*a(n-1) +(n-2)*(n-3)*a(n-2)=0. - R. J. Mathar, Jul 06 2023

Extensions

More terms from Alois P. Heinz, Feb 01 2011
Showing 1-3 of 3 results.