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

A374980 Number of multiset permutations of {1, 1, 2, 2, ..., n, n} with no fixed pair (j,j).

Original entry on oeis.org

1, 0, 5, 74, 2193, 101644, 6840085, 630985830, 76484389121, 11792973495032, 2254432154097861, 523368281765512930, 145044815855963403985, 47302856057098946329284, 17933275902554972391519893, 7820842217155394547769452734, 3887745712142302082441578104705
Offset: 0

Views

Author

Alois P. Heinz, Aug 05 2024

Keywords

Comments

Inverse binomial transform of A000680.

Examples

			a(2) = 5: 1212, 1221, 2112, 2121, 2211.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, [1, 0, 5][n+1],
         (n-1)*((2*n+1)*a(n-1)+(4*n-3)*a(n-2)+2*(n-2)*a(n-3)))
        end:
    seq(a(n), n=0..16);

Formula

a(n) = Sum_{j=0..n} (-1)^j*binomial(n,j)*A000680(n-j).
a(n) = A116218(n)/2^n.
a(n) mod 2 = 1 - (n mod 2) = A059841(n).

A116219 If X_1,...,X_n is a partition of a 3n-set X into 3-blocks then a(n) is equal to the number of permutations f of X such that f(X_i) <> X_i, (i=1,...,n).

Original entry on oeis.org

0, 684, 350352, 470444112, 1293433432704, 6355554535465920, 50823027472983319296, 618002474327361540442368, 10855431334634213344062394368, 264600531449039456516679858441216, 8665832467934840277899318819803484160, 371368757645100314808527266212241861300224
Offset: 1

Views

Author

Milan Janjic, Apr 09 2007

Keywords

Crossrefs

Programs

  • GAP
    List([1..20], n-> Sum([0..n], j-> (-6)^j*Binomial(n,j)* Factorial(3*n-3*j))); # G. C. Greubel, May 11 2019
  • Magma
    [(&+[(-6)^j*Binomial(n, j)*Factorial(3*n-3*j): j in [0..n]]): n in [1..20]]; // G. C. Greubel, May 11 2019
    
  • Maple
    a:=n->sum((-6)^i*binomial(n,i)*(3*n-3*i)!,i=0..n).
  • Mathematica
    Table[Sum[(-6)^i*Binomial[n, i]*(3*n - 3*i)!, {i, 0, n}], {n, 1, 20}] (* G. C. Greubel, May 11 2019 *)
  • PARI
    {a(n) = sum(j=0,n, (-6)^j*binomial(n,j)*(3*(n-j))!)}; \\ G. C. Greubel, May 11 2019
    
  • Sage
    [sum((-6)^j*binomial(n,j)*factorial(3*n-3*j) for j in (0..n)) for n in (1..20)] # G. C. Greubel, May 11 2019
    

Formula

a(n) = Sum_{j=0..n} (-6)^j*binomial(n,j)*(3*n-3*j)!.

A116220 If X_1,...,X_n is a partition of a 4n-set X into 4-blocks then a(n) is equal to the number of permutations f of X such that f(X_i) <> X_i, (i=1,...,n).

Original entry on oeis.org

0, 39744, 476126208, 20876944084992, 2430394026897309696, 620098244484731975761920, 304784138698487640049544331264, 263072308376236973471661993731555328, 371936496850567880606221498503260339699712, 815826011669313721421241471652159968573722198016
Offset: 1

Views

Author

Milan Janjic, Apr 09 2007

Keywords

Crossrefs

Programs

  • GAP
    List([1..20], n-> Sum([0..n], j-> (-24)^j*Binomial(n,j)* Factorial(4*n-4*j))); # G. C. Greubel, May 11 2019
  • Magma
    [(&+[(-24)^j*Binomial(n, j)*Factorial(4*n-4*j): j in [0..n]]): n in [1..20]]; // G. C. Greubel, May 11 2019
    
  • Maple
    a:=n->sum((-24)^i*binomial(n,i)*(4*n-4*i)!,i=0..n).
  • Mathematica
    Table[Sum[(-24)^j*Binomial[n, j]*(4*n-4*j)!, {j,0,n}], {n, 1, 20}] (* G. C. Greubel, May 11 2019 *)
  • PARI
    {a(n) = sum(j=0,n, (-24)^j*binomial(n,j)*(4*(n-j))!)}; \\ G. C. Greubel, May 11 2019
    
  • Sage
    [sum((-24)^j*binomial(n,j)*factorial(4*n-4*j) for j in (0..n)) for n in (1..20)] # G. C. Greubel, May 11 2019
    

Formula

a(n) = Sum_{j=0..n} (-24)^j*binomial(n,j)*(4*n-4*j)!.

A116221 If X_1,...,X_n is a partition of a 5n-set X into 5-blocks then a(n) is equal to the number of permutations f of X such that f(X_i) <> X_i, (i=1,...,n).

Original entry on oeis.org

0, 3614400, 1306371456000, 2432274637386240000, 15509750490368582860800000, 265241692266421512138485760000000, 10332925158674345473855915900600320000000, 815905363532798455769292988741440720076800000000, 119621339682330952236606797649198078512534126592000000000
Offset: 1

Views

Author

Milan Janjic, Apr 09 2007

Keywords

Crossrefs

Programs

  • GAP
    List([1..20], n-> Sum([0..n], j-> (-120)^j*Binomial(n,j)* Factorial(5*n-5*j))); # G. C. Greubel, May 11 2019
  • Magma
    [(&+[(-120)^j*Binomial(n, j)*Factorial(5*n-5*j): j in [0..n]]): n in [1..20]]; // G. C. Greubel, May 11 2019
    
  • Maple
    a:=n->sum((-120)^i*binomial(n,i)*(5*n-5*i)!,i=0..n).
  • Mathematica
    Table[Sum[(-5!)^j*Binomial[n, j]*(5*n-5*j)!, {j,0,n}], {n,1,20}] (* G. C. Greubel, May 11 2019 *)
  • PARI
    {a(n) = sum(j=0,n, (-120)^j*binomial(n,j)*(5*(n-j))!)}; \\ G. C. Greubel, May 11 2019
    
  • Sage
    [sum((-120)^j*binomial(n,j)*factorial(5*n-5*j) for j in (0..n)) for n in (1..20)] # G. C. Greubel, May 11 2019
    

Formula

a(n) = Sum_{j=0..n} (-120)^j*binomial(n,j)*(5*n-5*k)!.

A177840 Consider the n pairs (1,2), ..., (2n-1,2n); a(n) is the number of permutations of [ 2n ] with no two fixed points for any pair.

Original entry on oeis.org

1, 1, 21, 653, 37577, 3434169, 457819549, 83900098309, 20238575173137, 6217167231292913, 2369809434953636261, 1097587512530348834301, 607119566298408076479961, 395312612701784187384578473, 299298318246814086742418737197, 260721599469397754183307347278709
Offset: 0

Views

Author

Paul Weisenhorn, May 14 2010

Keywords

Comments

Inverse binomial transform of (2n)!. - Peter Luschny, May 31 2014
Also, the number of permutations of [2n] with no two cycle (2i-1,2i) for any pair. The number of permutation where no such pair is exchanged or fixed pointwise is A116218. - Aaron Meyerowitz, Jul 22 2023

Examples

			a(2) = 21, because there are 4! = 24 permutations of [ 4 ], only 3 of them have pairs with 2 fixed points: [1,2,3,4], [1,2,4,3], [2,1,3,4].
a(3) = A(3,0) = 653, A(3,1) = 63, A(3,2) = 3, A(3,4) = 1, sum = 720 = 6!.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember;
          `if`(n<2, 1-n, (n-1) *(f(n-1)+f(n-2)))
        end:
    a:= n-> add(binomial(n,j) *2^j *f(2*n-j), j=0..n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Sep 06 2011
  • Mathematica
    f[n_] := f[n] = If[n<2, 1-n, (n-1)*(f[n-1]+f[n-2])]; a[n_] := Sum[Binomial[ n, j]*2^j*f[2*n-j], {j, 0, n}]; Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Feb 25 2017, after Alois P. Heinz *)

Formula

a(n) = Sum_{j=0..n} C(n,j) * 2^j * f(2*n-j), where f(n) is the number of permutations of [n] with no fixed-points (A000166).
a(n) = A(n,0), with A(n,s) = number of permutations of [2n] with exactly s pairs with 2 fixed points:
A(n,s) = (n!/s!) * Sum_{j=0..n-s} 1/(j!*(n-s-j)!) * 2^j * f(2*(n-s)-j).
A(n,n) = 1, A(n,n-1) = n, A(n,n-2) = 21*n!/(2*(n-2)!).
Sum_{s=0..n} A(n,s) = (2*n)!.
a(n) = Sum_{j=0..n} C(n,j)*(2*n-2*j)!*(-1)^j. - Tani Akinari, Feb 01 2015
A(n,s) = Sum_{j=s..n} C(n,j)*C(j,s)*(2*n-2*j)!*(-1)^(j-s). - Tani Akinari, Feb 01 2015
From Peter Bala, Mar 07 2015: (Start)
a(n) = Integral_{x = 0..oo} (x^2 - 1)^n*exp(-x) dx.
For n >= 1, Integral_{x = 0..1} (x^2 - 1)^n*exp(x) dx = A007060(n)*e - a(n). Hence lim_{n->oo} a(n)/A007060(n) = e.
O.g.f. with a(0) := 1: Sum_{k >= 0} (2*k)!*x^k/(1 + x)^(k + 1) = 1 + x + 21*x^2 + 653*x^3 + ....
a(n) = 2*n*(2*n - 1)*a(n-1) + 4*n*(n - 1)*a(n-2) + (-1)^n, with initial conditions a(0) = 1, a(1) = 1.
Homogeneous recurrence: a(n) = (4*n^2 - 2*n - 1)*a(n-1) + 2*(n - 1)*(4*n - 3)*a(n-2) + 4*(n - 1)*(n - 2)*a(n-3), with initial conditions a(0) = 1, a(1) = 1 and a(2) = 21. Cf. A064570. (End)
a(n) ~ sqrt(Pi) * 2^(2*n+1) * n^(2*n + 1/2) / exp(2*n). - Vaclav Kotesovec, Mar 10 2015
a(n) = (2*n)!*hypergeom([],[1/2-n],1/4)+(-1)^n*(1-hypergeom([1],[1/2,n+1],1/4)). - Peter Luschny, Mar 15 2015

Extensions

b-file changed to a-file by N. J. A. Sloane, Oct 05 2010
Edited by Alois P. Heinz, Sep 06 2011
a(0)=1 prepended by Alois P. Heinz, Jul 23 2023

A375220 T(n,k) is the number of permutations of the multiset {1, 1, 2, 2, ..., n, n} with k occurrences of fixed pairs (j,j), where T(n,k), n >= 2, 0 <= k <= n-2 is a triangle read by rows.

Original entry on oeis.org

5, 74, 15, 2193, 296, 30, 101644, 10965, 740, 50, 6840085, 609864, 32895, 1480, 75, 630985830, 47880595, 2134524, 76755, 2590, 105, 76484389121, 5047886640, 191522380, 5692064, 153510, 4144, 140, 11792973495032, 688359502089, 22715489880, 574567140, 12807144, 276318, 6216, 180
Offset: 2

Views

Author

Hugo Pfoertner, Aug 08 2024

Keywords

Examples

			The triangle begins
          5,
         74,       15,
       2193,      296,      30,
     101644,    10965,     740,    50,
    6840085,   609864,   32895,  1480,   75,
  630985830, 47880595, 2134524, 76755, 2590, 105
		

Crossrefs

Cf. A000217, A000680, A028895, A116218, A374980 (column 0), A375222 (column 1), A375223.
Cf. A375219 (similar for triples in the multiset).

Programs

  • PARI
    \\ using functions mima and a375219 from A375219, row n of triangle:
    a375219(n,sizeb=2)

Formula

T(n,n) = 1, T(n,n-1) = 0 (terms not in DATA),
T(n,n-2) = 5*n*(n-1)/2 = 5*A000217(n-1) = A028895(n-1),
Sum_{j=0..n-2} T(n,j) = (2*n)!/(2^n) - 1 = A000680(n) - 1,
Sum_{j=1..n-2} T(n,j) = A375223(n) - 1.
Showing 1-6 of 6 results.