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

A001044 a(n) = (n!)^2.

Original entry on oeis.org

1, 1, 4, 36, 576, 14400, 518400, 25401600, 1625702400, 131681894400, 13168189440000, 1593350922240000, 229442532802560000, 38775788043632640000, 7600054456551997440000, 1710012252724199424000000, 437763136697395052544000000, 126513546505547170185216000000
Offset: 0

Views

Author

Keywords

Comments

Let M_n be the symmetrical n X n matrix M_n(i,j) = 1/Max(i,j); then for n > 0 det(M_n)=1/a(n). - Benoit Cloitre, Apr 27 2002
The n-th entry of the sequence is the value of the permanent of a k X k matrix A defined as follows: k is the n-th odd number; if we concatenate the rows of A to form a vector v of length n^2, v_{i}=1 if i=1 or a multiple of 2. - Simone Severini, Feb 15 2006
a(n) = number of set partitions of {1,2,...,3n-1,3n} into blocks of size 3 in which the entries of each block mod 3 are distinct. For example, a(2) = 4 counts 123-456, 156-234, 126-345, 135-246. - David Callan, Mar 30 2007
From Emeric Deutsch, Nov 22 2007: (Start)
Number of permutations of {1,2,...,2n} with no even entry followed by a smaller entry. Example: a(2)=4 because we have 1234, 1324, 3124 and 2314.
Number of permutations of {1,2,...,2n} with n even entries that are followed by a smaller entry. Example: a(2)=4 because we have 2143, 3421, 4213 and 4321.
Number of permutations of {1,2,...,2n-1} with no even entry followed by a smaller entry. Example: a(2)=4 because we have 123, 132, 312 and 231.
Number of permutations of {1,2,...,2n-1} with n-1 odd entries followed by a smaller entry. Example: a(2)=4 because we have 132, 312, 231 and 321.
(End)
G. Leibniz in his "Ars Combinatoria" established the identity P(n)^2 = P(n-1)[P(n+1)-P(n)], where P(n) = n!. (For example, see the Burton reference.) - Mohammad K. Azarian, Mar 28 2008
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = sigma_2(gcd(i,j)) for 1 <= i,j <= n, and n>0, where sigma_2 is A001157. - Enrique Pérez Herrero, Aug 13 2011
The o.g.f. of 1/a(n) is BesselI(0,2*sqrt(x)). See Abramowitz-Stegun (reference and link under A008277), p. 375, 9.6.10. - Wolfdieter Lang, Jan 09 2012
Number of n x n x n cubes C of zeros and ones such that C(x,y,z) and C(u,v,w) can be nonzero simultaneously only if either x!=u, y!=v, or z!=w. This generalizes permutations which can be considered as n x n squares P of zeros and ones such that P(x,y) and P(u,v) can be nonzero simultaneously only if either x!=u or y!=v. - Joerg Arndt, May 28 2012
a(n) is the number of functions f:[n]->[n(n+1)/2] such that, if round(sqrt(2f(x))) = round(sqrt(2f(y))), then x=y. - Dennis P. Walsh, Nov 26 2012
From Jerrold Grossman, Jul 22 2018: (Start)
a(n) is the number of n X n 0-1 matrices whose row sums and column sums are both {1,2,...,n}.
a(n) is the number of linear arrangements of 2n blocks of n different colors, 2 of each color, such that there are an even number of blocks between each pair of blocks of the same color.
(End)
Number of ways to place n instances of a digit inside an n X n X n cube so that no two instances lie on a plane parallel to a face of the cube (see Khovanova link, Lemma 6, p. 22). - Tanya Khovanova and Wayne Zhao, Oct 17 2018
Number of permutations P of length 2n which maximize Sum_{i=1..2n} |P_i - i|. - Fang Lixing, Dec 07 2018

Examples

			Consider the square array
  1,  2,  3,  4,  5,  6, ...
  2,  4,  6,  8, 10, 12, ...
  3,  6,  9, 12, 15, 18, ...
  4,  8, 12, 16, 20, 24, ...
  5, 10, 15, 20, 25, 30, ...
  ...
then a(n) = product of n-th antidiagonal. - _Amarnath Murthy_, Apr 06 2003
a(3) = 36 since there are 36 functions f:[3]->[6] such that, if round(sqrt(2f(x))) = round(sqrt(2f(y))), then x=y. The functions, denoted by <f(1),f(2),f(3)>, are <1,2,4>, <1,2,5>, <1,2,6>, <1,3,4>, <1,3,5>, <1,3,6> and their respective permutations. - _Dennis P. Walsh_, Nov 26 2012
1 + x + 4*x^2 + 36*x^3 + 576*x^4 + 14400*x^5 + 518400*x^6 + ...
		

References

  • Archimedeans Problems Drive, Eureka, 22 (1959), 15.
  • David Burton, "The History of Mathematics", Sixth Edition, Problem 2, p. 433.
  • J. Dezert, editor, Smarandacheials, Mathematics Magazine, Aurora, Canada, No. 4/2004 (to appear).
  • S. M. Kerawala, The enumeration of the Latin rectangle of depth three by means of a difference equation, Bull. Calcutta Math. Soc., 33 (1941), 119-127.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 217.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • F. Smarandache, Back and Forth Factorials, Arizona State Univ., Special Collections, 1972.
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 5.62(b).

Crossrefs

First right-hand column of triangle A008955.
Row n=2 of A225816.
Cf. A000290.
With signs, a row of A288580.

Programs

  • GAP
    List([0..20],n->Factorial(n)^2); # Muniru A Asiru, Oct 24 2018
    
  • Haskell
    import Data.List (genericIndex)
    a001044 n = genericIndex a001044_list n
    a001044_list = 1 : zipWith (*) (tail a000290_list) a001044_list
    -- Reinhard Zumkeller, Sep 05 2015
    
  • Magma
    [Factorial(n)^2: n in [0..20]]; // Vincenzo Librandi, Oct 24 2018
    
  • Maple
    seq((n!)^2,n=0..20); # Dennis P. Walsh, Nov 26 2012
  • Mathematica
    Table[n!^2, {n, 0, 20}] (* Stefan Steinerberger, Apr 07 2006 *)
    Join[{1},Table[Det[DiagonalMatrix[Range[n]^2]],{n,20}]] (* Harvey P. Dale, Mar 31 2020 *)
  • PARI
    a(n)=n!^2 \\ Charles R Greathouse IV, Jun 15 2011
    
  • Python
    import math
    for n in range(0,20): print(math.factorial(n)**2, end=', ') # Stefano Spezia, Oct 29 2018

Formula

a(n) = Integral_{x>=0} 2*BesselK(0, 2*sqrt(x))*x^n. This integral represents the n-th moment of a positive function defined on the positive half-axis. - Karol A. Penson, Oct 09 2001
a(n) ~ 2*Pi*n*e^(-2*n)*n^(2*n). - Joe Keane (jgk(AT)jgk.org), Jun 07 2002
a(n) = polygorial(n, 4) = A000142(n)/A000079(n)*A000165(n) = (n!/2^n)*Product_{i=0..n-1} (2*i + 2) = n!*Pochhammer(1, n) = n!^2. - Daniel Dockery (peritus(AT)gmail.com), Jun 13 2003
a(n) = Sum_{k>=0} (-1)^k*C(n, k)^2*k!*(2*n-k)!. - Philippe Deléham, Jan 07 2004
a(n) = !n!1 = !n! = Product{i=0, 1, 2, ... .}_{0 < |n-i| <= n}(n-i) = n(n-1)(n-2)...(2)(1)(-1)(-2)...(-n+2)(-n+1)(-n) = [(-1)^n][(n!)^2]. - J. Dezert (Jean.Dezert(AT)onera.fr), Mar 21 2004
D-finite with recurrence: a(0) = 1, a(n) = n^2*a(n-1). - Arkadiusz Wesolowski, Oct 04 2011
From Sergei N. Gladkovskii, Jun 14 2012: (Start)
A(x) = Sum_{n>=0,N) a(n)*x^n = 1 + x/(U(0;N-2)-x); N >= 4; U(k)= 1 + x*(k+1)^2 - x*(k+2)^2/G(k+1); besides U(0;infinity)=x; (continued fraction).
Let B(x) = Sum_{n>=0} a(n)*x^n/((n!)*(n+s)!), then B(0) = 1/(1-x) for abs(x) < 1 and B(1)= -1/x * log(1-x) for abs(x)< 1.
(End).
G.f.: 1 + x*(G(0) - 1)/(x-1) where G(k) = 1 - (k+1)^2*(1 - x*G(k+1)). - Sergei N. Gladkovskii, Jan 15 2013
a(n) = det(S(i+2,j), 1 <= i,j <= n), where S(n,k) are Stirling numbers of the second kind. - Mircea Merca, Apr 04 2013
a(n) = (2*n+1)!*2^(-4*n)*Sum_{k=0..n} (-1)^k*C(2*n+1,n-k)/(2*k+1). - Mircea Merca, Nov 12 2013
a(n) = A000290(A000142(n)). - Michel Marcus, Nov 12 2013
Sum_{n>=0} 1/a(n) = A070910 [Gradsteyn, Rzyhik 0.246.1]. - R. J. Mathar, Feb 25 2014. Corrected by Ilya Gutkovskiy, Aug 16 2016
From Ivan N. Ianakiev, Aug 16 2016: (Start)
a(n) = a(n-1) + 2*((n-1)^2)*sqrt(a(n-1)*a(n-2)) + ((n-1)^4)*a(n-2), for n > 1.
a(n) = a(n-1) - 2*(n^2 - 1)*sqrt(a(n-1)*a(n-2)) + (n^2 - 1)*a(n-2), for n > 1.
(End).
From Ilya Gutkovskiy, Aug 16 2016: (Start)
a(n) = A184877(n)*A184877(n-1).
Sum_{n>=0} (-1)^n/a(n) = BesselJ(0,2) = A091681. (End)
Sum_{n>=0} a(n)/(2*n+1)! = 2*Pi/sqrt(27). - Daniel Suteu, Feb 06 2017
a(n) = [x^n] Product_{k=1..n} (1 + k^2*x). - Vaclav Kotesovec, Feb 19 2022
a(n) = (2*n+1)! * [x^(2*n+1)] 4*arcsin(x/2)/sqrt(4-x^2). - Ira M. Gessel, Dec 10 2024

Extensions

More terms from James Sellers, Sep 19 2000
More terms from Simone Severini, Feb 15 2006

A145894 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 the same parity for k values of j (0<=k<=n).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 4, 0, 2, 4, 0, 16, 0, 4, 0, 36, 0, 72, 0, 12, 36, 0, 324, 0, 324, 0, 36, 0, 576, 0, 2592, 0, 1728, 0, 144, 576, 0, 9216, 0, 20736, 0, 9216, 0, 576, 0, 14400, 0, 115200, 0, 172800, 0, 57600, 0, 2880, 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 A145893.
Without the 0's, it is the triangle of A134434.
Sum of entries in row n = n! = A000142(n).
T(n,n) = A010551(n).
Lower diagonals give: A226282, A226283, A226284, A226285, A226286. - Alois P. Heinz, May 29 2014

Examples

			T(3,1) = 4 because we have 132, 312, 213 and 231.
Triangle starts:
   1;
   0,  1;
   1,  0,   1;
   0,  4,   0,  2;
   4,  0,  16,  0,   4;
   0, 36,   0, 72,   0, 12;
  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) = 1 then 2*factorial((1/2)*n+1/2)^2*binomial((1/2)*n-1/2, (1/2)*k-1/2)^2/(k+1) 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] && OddQ[k], (2*(n/2+1/2)!^2*Binomial[n/2-1/2, k/2-1/2]^2)/(k+1), True, 0]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 19 2017, translated from Maple *)

Formula

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

A134435 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k odd entries that are followed by a smaller entry (n >= 0, k >= 0).

Original entry on oeis.org

1, 1, 2, 2, 4, 12, 12, 12, 72, 36, 144, 432, 144, 144, 1728, 2592, 576, 2880, 17280, 17280, 2880, 2880, 57600, 172800, 115200, 14400, 86400, 864000, 1728000, 864000, 86400, 86400, 2592000, 12960000, 17280000, 6480000, 518400
Offset: 0

Views

Author

Emeric Deutsch, Nov 22 2007

Keywords

Comments

Row n has ceiling(n/2) entries (for n>0). T(2n,0) = T(2n+1,0) = n!*(n+1)! = A010790(n).
T(n,k) is also the number of permutations of {1,2,...,n} having k adjacent pairs of the form (odd, odd) (0 <= k <= ceiling(n,2)-1). Example: T(3,1)=4 because we have 132, 213, 312 and 231. - Emeric Deutsch, Dec 14 2008

Examples

			T(3,1) = 4 because we have 132, 312, 231 and 321.
Triangle starts:
    1;
    1;
    2;
    2,   4;
   12,  12;
   12,  72,  36;
  144, 432, 144;
  ...
		

Crossrefs

Bisection of column k=0 gives A010790.
Row sums give A000142.
Cf. A134434.

Programs

  • Maple
    T:=proc(n, k) if `mod`(n, 2)=0 then binomial((1/2)*n-1, k)*binomial((1/2)* n+1, k+1)*factorial((1/2)*n)^2 elif `mod`(n, 2)=1 then factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2)*binomial((1/2)*n-1/2, k)*binomial((1/2)* n+1/2, k) else 0 end if end proc: for n from 0 to 11 do seq(T(n, k), k=0..max(0,ceil((1/2)*n)-1)) end do; # yields sequence in triangular form
  • Mathematica
    T[n_,k_]:=If[EvenQ[n],((n/2)!)^2Binomial[n/2-1,k]Binomial[n/2+1,k+1], ((n-1)/2)!((n+1)/2)!Binomial[(n-1)/2,k]Binomial[(n+1)/2,k]]; Table[T[n,k],{n,11},{k,0,Floor[(n-1)/2]}]//Flatten (* Stefano Spezia, Jul 12 2024 *)

Formula

T(2n,k) = (n!)^2*C(n-1,k) C(n+1,k+1); T(2n+1,k) = n!(n+1)! * C(n,k) * C(n+1,k).

Extensions

T(0,0)=1 prepended by Alois P. Heinz, Jul 12 2024

A180064 a(n) = n!/A056040(n).

Original entry on oeis.org

1, 1, 1, 1, 4, 4, 36, 36, 576, 576, 14400, 14400, 518400, 518400, 25401600, 25401600, 1625702400, 1625702400, 131681894400, 131681894400, 13168189440000, 13168189440000, 1593350922240000, 1593350922240000, 229442532802560000, 229442532802560000
Offset: 0

Views

Author

Robert G. Wilson v, Aug 08 2010

Keywords

Comments

From Emeric Deutsch, Dec 24 2008 [edited and moved here by Andrey Zabolotskiy, Oct 19 2023]: (Start)
a(n+1) is the number of permutations of {1,2,...,n} with no even entry followed by a smaller entry. Example: a(5)=4 because we have 1234, 1324, 3124 and 2314.
a(n+1) is the number of permutations p of {1,2,...,n} such that p(j) is odd whenever j is even. Example: a(5)=4 because we have 4123, 2143, 2341 and 4321.
a(n+1) = A134434(n,0). (End)

Crossrefs

Programs

  • Maple
    A180064 := n -> iquo(n,2)!^2; # Peter Luschny, Aug 23 2010
  • Mathematica
    f[n_] := 2^(n - Mod[n, 2])*Product[k^((-1)^(k+1)), {k,n}]; Array[ #!/f@# &, 25, 0]

Formula

a(n) = A000142(n) / A056040(n).
a(n) = floor(n/2)!^2. - Peter Luschny, Aug 23 2010

A136715 Triangle T(n,k), 1 <= k <= n, read by rows: T(n,k) is the number of permutations of the set {2,4,6,...,2n} with k excedances. Equivalently, T(n,k) is the number of permutations in the symmetric group S_n having k multiplicative 2-excedances.

Original entry on oeis.org

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

Views

Author

Peter Bala, Jan 18 2008

Keywords

Comments

Let E_n denote the set {2,4,6,...,2n} and let p denote a bijection p:E_n -> E_n. We say the permutation p has an excedance at position i, 1 <= i <= n, if p(2i) > i. For example, if we represent p in one line notation by the vector (p(2),p(4),...,p(2n)), then the permutation (6,2,8,4,10) of E_5 has three excedances in total (at positions 1, 3 and 5). This array gives the number of permutations of the set E_n with k excedances. This is the viewpoint taken in [Jansson]. See A136716 for the corresponding array when the set E_n is replaced by the set O_n := {1,3,5,...,2n-1}.
Alternatively, we can work with permutations (p(1),p(2),...,p(n)) in the symmetric group S_n and define p to have a multiplicative 2-excedance at position i, 1 <= i <= n, if 2*p(i) > i. Then the (n,k)-th entry of this array gives the number of permutations in S_n with k multiplicative 2-excedances. Compare with A008292, the triangle of Eulerian numbers, which enumerates permutations by the usual excedance number and A136717 which enumerates permutations by multiplicative 3-excedances.
Let e(p)= |{i | 1 <= i < = n, 2*p(i) > i}| denote the number of multiplicative 2-excedances in the permutation p of S_n. This 2-excedance statistic e(p) on the symmetric group S_n is related to a descent statistic as follows.
Define a permutation p in S_n to have a descent from even at position i, 1 <= i <= n-1, if p(i) is even and p(i) > p(i+1). For example, the permutation (2,1,3,5,6,4) in S_6 has two descents from even (at position 1 and position 5). Array A134434 records the number of permutations of S_n with k descents from even.
Let d(p) = |{i | 1 <= i <= n-1, p(i) is even & p(i) > p(i+1)}| count the descents from even in the permutation p. Comparison of the formulas for the entries of this table with the formulas for the entries of A134434 shows that e(p) and d(p) are related by sum {p in S_n} x^e(p) = x^ceiling(n/2)* sum {p in S_n} x^d(p). Thus the shifted multiplicative 2-excedance statistic e(p) - ceiling(n/2) and the descent statistic d(p) are equidistributed on the symmetric group S_n.

Examples

			T(4,2) = 4; the four permutations in S_4 with two multiplicative 2-excedances are (3,4,1,2), (4,3,1,2), (3,1,4,2) and (4,1,3,2). Alternatively, the four permutations (6,8,2,4), (8,6,2,4), (6,2,8,4) and (8,2,6,4) of the set E_4 each have 2 excedances.
Triangle starts
n\k|..1....2....3....4....5....6
--------------------------------
1..|..1
2..|..1....1
3..|..0....4....2
4..|..0....4...16....4
5..|..0....0...36...72...12
6..|..0....0...36..324..324...36
		

Crossrefs

Formula

Recurrence relations:
T(2n,k) = (k+1-n)*T(2n-1,k) + (3n-k)*T(2n-1,k-1) for n >= 1;
T(2n+1,k) = (k-n)*T(2n,k) + (3n+2-k)*T(2n,k-1) for n >= 0. Boundary conditions: T(0,k) = 0 all k; T(n,0) = 0 all n; T(1,1) = 1.
The recurrence relations have the explicit solution T(2n,n+k) = [n!* C(n,k)]^2 and T(2n+1,n+k+1) = 1/(k+1)*[(n+1)!*C(n,k)]^2 = n!*(n+1)!*C(n,k)*C(n+1,k+1); or as a single formula, T(n,k) = floor(n/2)! * floor((n+1)/2)! * C(floor(n/2),k-floor((n+1)/2)) * C(floor((n+1)/2),k-floor(n/2)). Also T(2n,n+k) = n!^2 * A008459 (n,k); T(2n+1,n+k+1) = n!*(n+1)!* A103371 (n,k).
For the even numbered rows, define the shifted row polynomials F(2n,x) := x^(1-n)* sum {k = n..2n} T(2n,k)*x^k = n!^2 * x * (1 + C(n,1)^2*x + C(n,2)^2*x^2 + ... + C(n,n)^2*x^n). For the odd numbered rows, define the shifted row polynomials F(2n+1,x) := x^(-n)* sum {k = n+1..2n+1} T(2n+1,k)*x^k = n!*(n+1)!* ((n+1)*N(n+1,1)*x + n*N(n+1,2)*x^2 +(n-1)* N(n+1,3)*x^3 + ... + N(n+1,n+1)*x^(n+1)), where N(n,k) denotes the Narayana numbers. The first few values are F(1,x) = x, F(2,x) =x+x^2, F(3,x) = 4x+2x^2 and F(4,x) = 4x+16x^2+4x^2.
The recurrence relations yield the identities x*d/dx(F(2n-1,x)/(1-x)^(2n)) = F(2n,x)/(1-x)^(2n+1) and x*d/dx(1/x*F(2n,x)/(1-x)^(2n+1)) = F(2n+1,x)/(1-x)^(2n+2), for n = 1,2,3,... . An easy induction argument now gives the Taylor series expansions: F(2n,x)/(1-x)^(2n+1) = sum {m = 1..inf} (m*(m+1)*...*(m+n-1))^2*x^m; F(2n+1,x)/(1-x)^(2n+2) = sum {m = 1..inf} m*((m+1)*(m+2)*...*(m+n))^2*x^m.
For example, when n = 3 we have for row 6 the expansion (36x + 324x^2 + 324x^3 + 36x^4)/(1-x)^7 = 36x + 576x^2 + 3600x^3 + ... = (1.2.3)^2*x + (2.3.4)^2*x^2 + (3.4.5)^2*x^3 + ... and for row 7 the expansion (576x + 2592x^2 + 1728x^3 + 144x^4)/(1-x)^8 = 576x + 7200x^2 + 43200x^3 + ... = 1*(2.3.4)^2*x + 2*(3.4.5)^2*x^2 + 3*(4.5.6)^2*x^3 + ... .
Relation with the Jacobi polynomials P_n(a,b,x): F(2n,x) = n!^2*x*(1-x)^n *P_n(0,0,(1+x)/(1-x)), F(2n+1,x) = n!*(n+1)!*x*(1-x)^n *P_n(1,0,(1+x)/(1-x)).
Worpitzky-type identities:
Sum {k = n..2n} T(2n,k)*C(x+k,2n) = ((x+1)*(x+2)*...*(x+n))^2;
sum {k = n+1..2n+1} T(2n+1,k)*C(x+k,2n+1) = ((x+1)*(x+2)*...*(x+n))^2*(x+n+1);
and for the odd numbered rows read in reverse order, sum {k = n+1..2n+1} T(2n+1,3n+2-k)*C(x+k,2n+1) = (x+1)*((x+2)*(x+3)*...*(x+n+1))^2.

A145891 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k adjacent pairs of the form (odd,even) (0<=k<=floor(n/2)).

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, Nov 30 2008

Keywords

Comments

Also number of permutations of {1,2,...,n} having k adjacent pairs of the form (even,odd). Example: T(3,1) = 4 because we have 123, 213, 231 and 321.
Row n contains 1+floor(n/2) entries.
Mirror image of A134434.
Sum of entries in row n = n! = A000142(n).
Sum_{k>=0} k*T(n,k) = A077613(n).

Examples

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

Crossrefs

Programs

  • Maple
    T:=proc(n,k) if `mod`(n, 2) = 0 then factorial((1/2)*n)^2*binomial((1/2)*n, k)^2 else factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2)*binomial((1/2)*n-1/2, k)*binomial((1/2)*n+1/2, k) end if end proc: for n from 0 to 11 do seq(T(n,k), k =0..floor((1/2)*n)) end do; # yields sequence in triangular form
  • Mathematica
    T[n_,k_]:=If[EvenQ[n],Floor[(n/2)!Binomial[n/2,k]]^2, ((n-1)/2)!((n+1)/2)!Binomial[(n-1)/2,k]Binomial[(n+1)/2,k]]; Table[T[n,k],{n,0,11},{k,0,Floor[n/2]}]//Flatten (* Stefano Spezia, Jul 12 2024 *)

Formula

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

A145892 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k adjacent pairs of the form (even,even) (0<=k<=floor(n/2)-1).

Original entry on oeis.org

1, 1, 2, 6, 12, 12, 72, 48, 144, 432, 144, 1440, 2880, 720, 2880, 17280, 17280, 2880, 43200, 172800, 129600, 17280, 86400, 864000, 1728000, 864000, 86400, 1814400, 12096000, 18144000, 7257600, 604800, 3628800, 54432000, 181440000, 181440000, 54432000, 3628800
Offset: 0

Views

Author

Emeric Deutsch, Nov 30 2008

Keywords

Comments

Row n contains floor(n/2) entries (n>=2).
Sum of entries in row n = n! = A000142(n).
Sum_{k>=0} k*T(n,k) = A077612(n).
T(2n,k) = A134435(2n,k).

Examples

			T(4,1) = 12 because we have 1243, 1423, 1324, 1342, 3124, 3142, 2413, 4213, 2431, 4231, 3241 and 3421.
Triangle starts:
     1;
     1;
     2;
     6;
    12,   12;
    72,   48;
   144,  432, 144;
  1440, 2880, 720;
  ...
		

Crossrefs

Programs

  • Maple
    T:=proc(n,k) if `mod`(n, 2) = 0 then factorial((1/2)*n)^2*binomial((1/2)*n-1, k)*binomial((1/2)*n+1, k+1) else factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2)*binomial((1/2)*n-3/2, k)*binomial((1/2)* n+3/2, k+2) end if end proc: 1; 1; for n from 2 to 12 do seq(T(n, k), k = 0 .. floor((1/2)*n)-1) end do; # yields sequence in triangular form
  • Mathematica
    T[n_,k_]:=If[EvenQ[n],((n/2)!)^2Binomial[n/2-1,k]Binomial[n/2+1,k+1], ((n-1)/2)!((n+1)/2)!Binomial[(n-3)/2,k]Binomial[(n+3)/2,k+2]]; Join[{1,1},Flatten[Table[T[n,k],{n,0,12},{k,0,Floor[n/2]-1}]]] (* Stefano Spezia, Jul 12 2024 *)

Formula

T(2n,k) = (n!)^2*C(n-1,k)*C(n+1,k+1); T(2n+1,k) = n!(n+1)! * C(n-1,k) * C(n+2,k+2).

A136718 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k entries divisible by 3 that are followed by a smaller entry (n>=1, k>=0).

Original entry on oeis.org

1, 2, 2, 4, 12, 12, 72, 48, 72, 456, 192, 960, 3120, 960, 10800, 23760, 5760, 10800, 133920, 183600, 34560, 241920, 1572480, 1572480, 241920, 4233600, 18869760, 14878080, 1935360, 4233600, 84309120, 233331840, 141644160, 15482880
Offset: 1

Views

Author

Peter Bala, Jan 23 2008

Keywords

Comments

Define a permutation (p(1),p(2),...,p(n)) in the symmetric group S_n to have a multiplicative 3-descent at position i, 1 <= i <= n-1, if p(i) > p(i+1) and 3|p(i). The (n,k)-th entry in this array gives the number of permutations in S_n with k multiplicative 3-descents.
Compare with A008292, the triangle of Eulerian numbers, which enumerates permutations by the usual descent number and A134434, which enumerates permutations by multiplicative 2-descents. This multiplicative 3-descent statistic is equidistributed on the symmetric group S_n with a multiplicative 3-excedance statistic - see A136717 for details.

Examples

			T(3,1) = 4; the four permutations in the group S_3 with a single multiplicative 3-descent are (1,3,2), (3,1,2), (2,3,1) and (3,2,1). The remaining two permutations in S_3, namely (1,2,3) and (2,1,3), have no multiplicative 3-descents.
Table starts
n\k|..0....1....2
-----------------
1..|..1
2..|..2
3..|..2....4
4..|.12...12
5..|.72...48
6..|.72..456..192
		

Crossrefs

Cf. A000142 (row sums), A008292, A134434, A136717.

Programs

  • Mathematica
    T[n_?Positive, k_] /; 0 <= k <= Floor[n/3] := T[n, k] = Switch[Mod[n, 3], 1|2, (k+1)T[n-1, k+1] + (n-k)T[n-1, k], 0, (k+1)T[n-1, k] + (n-k)T[n-1, k-1]];
    T[1, 0] = 1; T[, ] = 0;
    Table[T[n, k], {n, 1, 12}, {k, 0, Floor[n/3]}] // Flatten (* Jean-François Alcover, Nov 12 2019 *)

Formula

Recurrence relations: T(3n+1,k) = (k+1)*T(3n,k+1) + (3n+1-k)*T(3n,k); T(3n+2,k) = (k+1)*T(3n+1,k+1) + (3n+2-k)*T(3n+1,k); T(3n+3,k) = (k+1)*T(3n+2,k) + (3n+3-k)*T(3n+2,k-1); with boundary conditions T(n,-1) = 0 for all n, T(1,0) = 1, T(1,k) = 0 for k > 0.
The row polynomials A(n,x) := sum {k = 0..floor(n/3)} T(n,k)*x^k satisfy the recursion relations: A(3n+1,x) = (1-x)*d/dx(A(3n,x)) + (3n+1)*A(3n,x); A(3n+2,x) = (1-x)*d/dx(A(3n+1,x)) + (3n+2)*A(3n+1,x); A(3n+3,x) = (x-x^2)*d/dx(A(3n+2,x)) + ((3n+2)x+1)*A(3n+2,x).

Extensions

Keyword corrected by Peter Bala, Oct 30 2008

A145889 Number of even entries that are followed by a smaller entry in all permutations of {1,2,...,n}.

Original entry on oeis.org

0, 1, 2, 24, 96, 1080, 6480, 80640, 645120, 9072000, 90720000, 1437004800, 17244057600, 305124019200, 4271736268800, 83691159552000, 1339058552832000, 28810681675776000, 518592270163968000, 12164510040883200000
Offset: 1

Views

Author

Emeric Deutsch, Nov 16 2008

Keywords

Comments

a(n) = Sum(k*A134434(n,k), k=0..floor(n/2)).
The average of the number of even entries that start a descent over all permutations of {1,2,...n} is (1/n)[floor(n/2)]^2.

Examples

			a(3)=2 because the permutations of {1,2,3} are 123, 132, 2'13, 231, 312 and 32'1 with the even entries that start a descent marked.
		

References

  • S. Kitaev and J. Remmel, Classifying descents according to parity, Annals of Combinatorics, 11, 2007, 173-193.

Crossrefs

Programs

  • Maple
    a:=proc(n) if `mod`(n,2)=0 then (1/4)*n*factorial(n) else (1/4)*(n-1)^2*factorial(n-1) end if end proc: seq(a(n),n=1..20);

Formula

a(2n) = n(2n)!/2; a(2n+1) = n^2*(2n)!.
D-finite with recurrence (-4*n+11)*a(n) +(9*n-25)*a(n-1) +(n-2)*(4*n^2-3*n-3)*a(n-2) -(n-2)*(n-3)*(5*n-7)*a(n-3)=0. - R. J. Mathar, Jul 31 2022
Showing 1-9 of 9 results.