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

A145893 Triangle read by rows: T(n,k) is the number of permutations p of {1,2,...,n} such that j and p(j) are of opposite parities for k values of j (0<=k<=n).

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 2, 0, 4, 0, 4, 0, 16, 0, 4, 12, 0, 72, 0, 36, 0, 36, 0, 324, 0, 324, 0, 36, 144, 0, 1728, 0, 2592, 0, 576, 0, 576, 0, 9216, 0, 20736, 0, 9216, 0, 576, 2880, 0, 57600, 0, 172800, 0, 115200, 0, 14400, 0, 14400, 0, 360000, 0, 1440000, 0, 1440000, 0, 360000, 0, 14400
Offset: 0

Views

Author

Emeric Deutsch, Nov 30 2008

Keywords

Comments

Mirror image of A145894.
Without the 0's it is the triangle of A145891.
Sum of entries in row n = n! = A000142(n).
Columns k=0,2,4,8,10,12 give: A010551, A226282, A226283, A226284, A226285, A226286. - Alois P. Heinz, May 29 2014

Examples

			T(3,2) = 4 because we have 132, 312, 213 and 231.
Triangle starts:
   1;
   1, 0;
   1, 0,   1;
   2, 0,   4, 0;
   4, 0,  16, 0,   4;
  12, 0,  72, 0,  36, 0;
  36, 0, 324, 0, 324, 0, 36;
  ...
		

Crossrefs

Programs

  • Maple
    T:=proc(n,k) if `mod`(n, 2) = 0 and `mod`(k, 2) = 0 then factorial((1/2)*n)^2*binomial((1/2)*n, (1/2)*k)^2 elif `mod`(n, 2) = 1 and `mod`(k, 2) = 0 then factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2)*binomial((1/2)*n-1/2, (1/2)*k)*binomial((1/2)*n+1/2, (1/2)*k) else 0 end if end proc: for n from 0 to 10 do seq(T(n, k), k = 0 .. n) end do; # yields sequence in triangular form
  • Mathematica
    T[n_, k_] := Which[EvenQ[n] && EvenQ[k], (n/2)!^2*Binomial[n/2, k/2]^2, OddQ[n] && EvenQ[k], (n/2-1/2)!*(n/2+1/2)!*Binomial[n/2-1/2, k/2] * Binomial[n/2+1/2, k/2], True, 0]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 20 2017, translated from Maple *)

Formula

T(2n,2k) = [n!*C(n,k)]^2; T(2n+1,2k) = n! (n+1)! C(n,k) C(n+1,k); elsewhere T(n,k)=0.

A226282 a(n) = [n/2]!*[(n+1)/2]!*C([n/2],1)*C([(n+1)/2],1).

Original entry on oeis.org

0, 1, 4, 16, 72, 324, 1728, 9216, 57600, 360000, 2592000, 18662400, 152409600, 1244678400, 11379916800, 104044953600, 1053455155200, 10666233446400, 118513704960000, 1316818944000000, 15933509222400000, 192795461591040000, 2523867860828160000, 33039724723568640000
Offset: 1

Views

Author

R. H. Hardin, connection of formula with combinatoric problem via N. J. A. Sloane in the Sequence Fans Mailing List, Jun 02 2013

Keywords

Comments

Number of permutations of n elements with 2 odd displacements.
Column 2 of A226288.
Column k=2 of A145893, a diagonal of A145894. - Alois P. Heinz, May 29 2014

Crossrefs

Programs

  • Mathematica
    Table[Floor[n/2]!Floor[(n+1)/2]!Binomial[Floor[n/2],1]Binomial[Floor[(n+1)/2],1],{n,30}] (* Harvey P. Dale, Aug 05 2023 *)

A226283 a(n) = [n/2]!*[(n+1)/2]!*C([n/2],2)*C([(n+1)/2],2).

Original entry on oeis.org

0, 0, 0, 4, 36, 324, 2592, 20736, 172800, 1440000, 12960000, 116640000, 1143072000, 11202105600, 119489126400, 1274550681600, 14748372172800, 170659735142400, 2133246689280000, 26665583616000000, 358503957504000000, 4819886539776000000, 69406366172774400000
Offset: 1

Views

Author

R. H. Hardin, connection of formula with combinatoric problem via N. J. A. Sloane in the Sequence Fans Mailing List, Jun 02 2013

Keywords

Comments

Number of permutations of n elements with 4 odd displacements.
Column 3 of A226288.
Column k=4 of A145893, a diagonal of A145894. - Alois P. Heinz, May 29 2014

Crossrefs

Programs

  • Mathematica
    a[n_]:=(Floor[n/2])!(Floor[(n+1)/2])!Binomial[Floor[n/2],2]Binomial[Floor[(n+1)/2],2]; Array[a,23] (* Stefano Spezia, Jul 12 2024 *)

A226284 a(n) = [n/2]!*[(n+1)/2]!*C([n/2],3)*C([(n+1)/2],3).

Original entry on oeis.org

0, 0, 0, 0, 0, 36, 576, 9216, 115200, 1440000, 17280000, 207360000, 2540160000, 31116960000, 398297088000, 5098202726400, 68825736806400, 929147446886400, 13273534955520000, 189621927936000000, 2868031660032000000, 43378978857984000000, 694063661727744000000
Offset: 1

Views

Author

R. H. Hardin, connection of formula with combinatoric problem via N. J. A. Sloane in the Sequence Fans Mailing List, Jun 02 2013

Keywords

Comments

Number of permutations of n elements with 6 odd displacements.
Column 4 of A226288.
Column k=6 of A145893, a diagonal of A145894. - Alois P. Heinz, May 29 2014

Crossrefs

Programs

  • Mathematica
    Table[Floor[n/2]!Floor[(n+1)/2]!Binomial[Floor[n/2],3]Binomial[Floor[ (n+1)/2], 3],{n,30}] (* Harvey P. Dale, Dec 12 2018 *)

A226285 a(n) = [n/2]!*[(n+1)/2]!*C([n/2],4)*C([(n+1)/2],4).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 576, 14400, 360000, 6480000, 116640000, 1905120000, 31116960000, 497871360000, 7965941760000, 129048256512000, 2090581755494400, 34843029258240000, 580717154304000000, 10038110810112000000, 173515915431936000000, 3123286477774848000000
Offset: 1

Views

Author

R. H. Hardin, connection of formula with combinatoric problem via N. J. A. Sloane in the Sequence Fans Mailing List, Jun 02 2013

Keywords

Comments

Number of permutations of n elements with 8 odd displacements.
Column 5 of A226288.
Column k=8 of A145893, a diagonal of A145894. - Alois P. Heinz, May 29 2014

Crossrefs

Programs

  • Mathematica
    a[n_]:= Floor[n/2]!*Floor[(n+1)/2]!*Binomial[Floor[n/2],4]*Binomial[Floor[(n+1)/2],4]; Array[a,21] (* Stefano Spezia, Jul 12 2024 *)

A226286 [n/2]!*[(n+1)/2]!*C([n/2],5)*C([(n+1)/2],5).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 14400, 518400, 18662400, 457228800, 11202105600, 238978252800, 5098202726400, 103238605209600, 2090581755494400, 41811635109888000, 836232702197760000, 16864026160988160000
Offset: 1

Views

Author

R. H. Hardin, connection of formula with combinatoric problem via N. J. A. Sloane in the Sequence Fans Mailing List, Jun 02 2013

Keywords

Comments

Number of permutations of n elements with 10 odd displacements.
Column 6 of A226288.
Column k=10 of A145893, a diagonal of A145894. - Alois P. Heinz, May 29 2014

A226287 a(n) = [n/2]!*[(n+1)/2]!*C([n/2],6)*C([(n+1)/2],6).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 518400, 25401600, 1244678400, 39829708800, 1274550681600, 34412868403200, 929147446886400, 23228686172160000, 580717154304000000, 14053355134156800000, 340091194246594560000
Offset: 1

Views

Author

R. H. Hardin, connection of formula with combinatoric problem via N. J. A. Sloane in the Sequence Fans Mailing List, Jun 02 2013

Keywords

Comments

Number of permutations of n elements with 12 odd displacements.
Column 7 of A226288.
Column k=12 of A145893, a diagonal of A145894. - Alois P. Heinz, May 29 2014
Showing 1-7 of 7 results.