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.

A000085 Number of self-inverse permutations on n letters, also known as involutions; number of standard Young tableaux with n cells.

Original entry on oeis.org

1, 1, 2, 4, 10, 26, 76, 232, 764, 2620, 9496, 35696, 140152, 568504, 2390480, 10349536, 46206736, 211799312, 997313824, 4809701440, 23758664096, 119952692896, 618884638912, 3257843882624, 17492190577600, 95680443760576, 532985208200576, 3020676745975552
Offset: 0

Views

Author

Keywords

Comments

a(n) is also the number of n X n symmetric permutation matrices.
a(n) is also the number of matchings (Hosoya index) in the complete graph K(n). - Ola Veshta (olaveshta(AT)my-deja.com), Mar 25 2001
a(n) is also the number of independent vertex sets and vertex covers in the n-triangular graph. - Eric W. Weisstein, May 22 2017
Equivalently, this is the number of graphs on n labeled nodes with degrees at most 1. - Don Knuth, Mar 31 2008
a(n) is also the sum of the degrees of the irreducible representations of the symmetric group S_n. - Avi Peretz (njk(AT)netvision.net.il), Apr 01 2001
a(n) is the number of partitions of a set of n distinguishable elements into sets of size 1 and 2. - Karol A. Penson, Apr 22 2003
Number of tableaux on the edges of the star graph of order n, S_n (sometimes T_n). - Roberto E. Martinez II, Jan 09 2002
The Hankel transform of this sequence is A000178 (superfactorials). Sequence is also binomial transform of the sequence 1, 0, 1, 0, 3, 0, 15, 0, 105, 0, 945, ... (A001147 with interpolated zeros). - Philippe Deléham, Jun 10 2005
Row sums of the exponential Riordan array (e^(x^2/2),x). - Paul Barry, Jan 12 2006
a(n) is the number of nonnegative lattice paths of upsteps U = (1,1) and downsteps D = (1,-1) that start at the origin and end on the vertical line x = n in which each downstep (if any) is marked with an integer between 1 and the height of its initial vertex above the x-axis. For example, with the required integer immediately preceding each downstep, a(3) = 4 counts UUU, UU1D, UU2D, U1DU. - David Callan, Mar 07 2006
Equals row sums of triangle A152736 starting with offset 1. - Gary W. Adamson, Dec 12 2008
Proof of the recurrence relation a(n) = a(n-1) + (n-1)*a(n-2): number of involutions of [n] containing n as a fixed point is a(n-1); number of involutions of [n] containing n in some cycle (j, n), where 1 <= j <= n-1, is (n-1) times the number of involutions of [n] containing the cycle (n-1 n) = (n-1)*a(n-2). - Emeric Deutsch, Jun 08 2009
Number of ballot sequences (or lattice permutations) of length n. A ballot sequence B is a string such that, for all prefixes P of B, h(i) >= h(j) for i < j, where h(x) is the number of times x appears in P. For example, the ballot sequences of length 4 are 1111, 1112, 1121, 1122, 1123, 1211, 1212, 1213, 1231, and 1234. The string 1221 does not appear in the list because in the 3-prefix 122 there are two 2's but only one 1. (Cf. p. 176 of Bruce E. Sagan: "The Symmetric Group"). - Joerg Arndt, Jun 28 2009
Number of standard Young tableaux of size n; the ballot sequences are obtained as a length-n vector v where v_k is the (number of the) row in which the number r occurs in the tableaux. - Joerg Arndt, Jul 29 2012
Number of factorial numbers of length n-1 with no adjacent nonzero digits. For example the 10 such numbers (in rising factorial radix) of length 3 are 000, 001, 002, 003, 010, 020, 100, 101, 102, and 103. - Joerg Arndt, Nov 11 2012
Also called restricted Stirling numbers of the second kind (see Mezo). - N. J. A. Sloane, Nov 27 2013
a(n) is the number of permutations of [n] that avoid the consecutive patterns 123 and 132. Proof. Write a self-inverse permutation in standard cycle form: smallest entry in each cycle in first position, first entries decreasing. For example, (6,7)(3,4)(2)(1,5) is in standard cycle form. Then erase parentheses. This is a bijection to the permutations that avoid consecutive 123 and 132 patterns. - David Callan, Aug 27 2014
Getu (1991) says these numbers are also known as "telephone numbers". - N. J. A. Sloane, Nov 23 2015
a(n) is the number of elements x in the symmetric group S_n such that x^2 = e where e is the identity. - Jianing Song, Aug 22 2018 [Edited on Jul 24 2025]
a(n) is the number of congruence orbits of upper-triangular n X n matrices on skew-symmetric matrices, or the number of Borel orbits in largest sect of the type DIII symmetric space SO_{2n}(C)/GL_n(C). Involutions can also be thought of as fixed-point-free partial involutions. See [Bingham and Ugurlu] link. - Aram Bingham, Feb 08 2020
From Thomas Anton, Apr 20 2020: (Start)
Apparently a(n) = b*c where b is odd iff a(n+b) (when a(n) is defined) is divisible by b.
Apparently a(n) = 2^(f(n mod 4)+floor(n/4))*q where f:{0,1,2,3}->{0,1,2} is given by f(0),f(1)=0, f(2)=1 and f(3)=2 and q is odd. (End)
From Iosif Pinelis, Mar 12 2021: (Start)
a(n) is the n-th initial moment of the normal distribution with mean 1 and variance 1. This follows because the moment generating function of that distribution is the e.g.f. of the sequence of the a(n)'s.
The recurrence a(n) = a(n-1) + (n-1)*a(n-2) also follows, by writing E(Z+1)^n=EZ(Z+1)^(n-1)+E(Z+1)^(n-1), where Z is a standard normal random variable, and then taking the first of the latter two integrals by parts. (End)

Examples

			Sequence starts 1, 1, 2, 4, 10, ... because possibilities are {}, {A}, {AB, BA}, {ABC, ACB, BAC, CBA}, {ABCD, ABDC, ACBD, ADCB, BACD, BADC, CBAD, CDAB, DBCA, DCBA}. - _Henry Bottomley_, Jan 16 2001
G.f. = 1 + x + 2*x^2 + 4*x^4 + 10*x^5 + 26*x^6 + 76*x^7 + 232*x^8 + 764*x^9 + ...
From _Gus Wiseman_, Jan 08 2021: (Start)
The a(4) = 10 standard Young tableaux:
  1 2 3 4
.
  1 2   1 3   1 2 3   1 2 4   1 3 4
  3 4   2 4   4       3       2
.
  1 2   1 3   1 4
  3     2     2
  4     4     3
.
  1
  2
  3
  4
The a(0) = 1 through a(4) = 10 set partitions into singletons or pairs:
  {}  {{1}}  {{1,2}}    {{1},{2,3}}    {{1,2},{3,4}}
             {{1},{2}}  {{1,2},{3}}    {{1,3},{2,4}}
                        {{1,3},{2}}    {{1,4},{2,3}}
                        {{1},{2},{3}}  {{1},{2},{3,4}}
                                       {{1},{2,3},{4}}
                                       {{1,2},{3},{4}}
                                       {{1},{2,4},{3}}
                                       {{1,3},{2},{4}}
                                       {{1,4},{2},{3}}
                                       {{1},{2},{3},{4}}
(End)
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, pages 32, 911.
  • S. Chowla, The asymptotic behavior of solutions of difference equations, in Proceedings of the International Congress of Mathematicians (Cambridge, MA, 1950), Vol. I, 377, Amer. Math. Soc., Providence, RI, 1952.
  • W. Fulton, Young Tableaux, Cambridge, 1997.
  • D. E. Knuth, The Art of Computer Programming, Vol. 3, Section 5.1.4, p. 65.
  • L. C. Larson, The number of essentially different nonattacking rook arrangements, J. Recreat. Math., 7 (No. 3, 1974), circa pages 180-181.
  • T. Muir, A Treatise on the Theory of Determinants. Dover, NY, 1960, p. 6.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 86.
  • 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).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 5.2.10.

Crossrefs

See also A005425 for another version of the switchboard problem.
Equals 2 * A001475(n-1) for n>1.
First column of array A099020.
A069943(n+1)/A069944(n+1) = a(n)/A000142(n) in lowest terms.
Cf. A152736, A128229. - Gary W. Adamson, Dec 12 2008
Diagonal of A182172. - Alois P. Heinz, May 30 2012
Row sums of: A047884, A049403, A096713 (absolute value), A100861, A104556 (absolute value), A111924, A117506 (M_4 numbers), A122848, A238123.
A320663/A339888 count unlabeled multiset partitions into singletons/pairs.
A322661 counts labeled covering half-loop-graphs.
A339742 counts factorizations into distinct primes or squarefree semiprimes.

Programs

  • Haskell
    a000085 n = a000085_list !! n
      a000085_list = 1 : 1 : zipWith (+)
        (zipWith (*) [1..] a000085_list) (tail a000085_list) -- Reinhard Zumkeller, May 16 2013
    
  • Maple
    A000085 := proc(n) option remember; if n=0 then 1 elif n=1 then 1 else procname(n-1)+(n-1)*procname(n-2); fi; end;
    with(combstruct):ZL3:=[S,{S=Set(Cycle(Z,card<3))}, labeled]:seq(count(ZL3,size=n),n=0..25); # Zerinvary Lajos, Sep 24 2007
    with (combstruct):a:=proc(m) [ZL, {ZL=Set(Cycle(Z, m>=card))}, labeled]; end: A:=a(2):seq(count(A, size=n), n=0..25); # Zerinvary Lajos, Jun 11 2008
  • Mathematica
    <Roger L. Bagula, Oct 06 2006 *)
    With[{nn=30},CoefficientList[Series[Exp[x+x^2/2],{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, May 28 2013 *)
    a[ n_] := Sum[(2 k - 1)!! Binomial[ n, 2 k], {k, 0, n/2}]; (* Michael Somos, Jun 01 2013 *)
    a[ n_] := If[ n < 0, 0, HypergeometricU[ -n/2, 1/2, -1/2] / (-1/2)^(n/2)]; (* Michael Somos, Jun 01 2013 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ Exp[ x + x^2 / 2], {x, 0, n}]]; (* Michael Somos, Jun 01 2013 *)
    Table[(I/Sqrt[2])^n HermiteH[n, -I/Sqrt[2]], {n, 0, 100}] (* Emanuele Munarini, Mar 02 2016 *)
    a[n_] := Sum[StirlingS1[n, k]*2^k*BellB[k, 1/2], {k, 0, n}]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jul 18 2017, after Emanuele Munarini *)
    RecurrenceTable[{a[n] == a[n-1] + (n-1)*a[n-2], a[0] == 1, a[1] == 1}, a, {n, 0, 20}] (* Joan Ludevid, Jun 17 2022 *)
    sds[{}]:={{}};sds[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sds[Complement[set,s]]]/@Cases[Subsets[set,{1,2}],{i,_}]; Table[Length[sds[Range[n]]],{n,0,10}] (* Gus Wiseman, Jan 11 2021 *)
  • Maxima
    B(n,x):=sum(stirling2(n,k)*x^k,k,0,n);
      a(n):=sum(stirling1(n,k)*2^k*B(k,1/2),k,0,n);
      makelist(a(n),n,0,40); /* Emanuele Munarini, May 16 2014 */
    
  • Maxima
    makelist((%i/sqrt(2))^n*hermite(n,-%i/sqrt(2)),n,0,12); /* Emanuele Munarini, Mar 02 2016 */
    
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( exp( x + x^2 / 2 + x * O(x^n)), n))}; /* Michael Somos, Nov 15 2002 */
    
  • PARI
    N=66; x='x+O('x^N); egf=exp(x+x^2/2); Vec(serlaplace(egf)) \\ Joerg Arndt, Mar 07 2013
    
  • Python
    from math import factorial
    def A000085(n): return sum(factorial(n)//(factorial(n-(k<<1))*factorial(k)*(1<>1)+1)) # Chai Wah Wu, Aug 31 2023
  • Sage
    A000085 = lambda n: hypergeometric([-n/2,(1-n)/2], [], 2)
    [simplify(A000085(n)) for n in range(28)] # Peter Luschny, Aug 21 2014
    
  • Sage
    def a85(n): return sum(factorial(n) / (factorial(n-2*k) * 2**k * factorial(k)) for k in range(1+n//2))
    for n in range(100): print(n, a85(n)) # Manfred Scheucher, Jan 07 2018
    

Formula

D-finite with recurrence a(0) = a(1) = 1, a(n) = a(n-1) + (n-1)*a(n-2) for n>1.
E.g.f.: exp(x+x^2/2).
a(n) = a(n-1) + A013989(n-2) = A013989(n)/(n+1) = 1+A001189(n).
a(n) = Sum_{k=0..floor(n/2)} n!/((n-2*k)!*2^k*k!).
a(m+n) = Sum_{k>=0} k!*binomial(m, k)*binomial(n, k)*a(m-k)*a(n-k). - Philippe Deléham, Mar 05 2004
For n>1, a(n) = 2*(A000900(n) + A000902(floor(n/2))). - Max Alekseyev, Oct 31 2015
The e.g.f. y(x) satisfies y^2 = y''y' - (y')^2.
a(n) ~ c*(n/e)^(n/2)exp(n^(1/2)) where c=2^(-1/2)exp(-1/4). [Chowla]
a(n) = HermiteH(n, 1/(sqrt(2)*i))/(-sqrt(2)*i)^n, where HermiteH are the Hermite polynomials. - Karol A. Penson, May 16 2002
a(n) = Sum_{k=0..n} A001498((n+k)/2, (n-k)/2)(1+(-1)^(n-k))/2. - Paul Barry, Jan 12 2006
For asymptotics see the Robinson paper.
a(n) = Sum_{m=0..n} A099174(n,m). - Roger L. Bagula, Oct 06 2006
O.g.f.: A(x) = 1/(1-x-1*x^2/(1-x-2*x^2/(1-x-3*x^2/(1-... -x-n*x^2/(1- ...))))) (continued fraction). - Paul D. Hanna, Jan 17 2006
From Gary W. Adamson, Dec 29 2008: (Start)
a(n) = (n-1)*a(n-2) + a(n-1); e.g., a(7) = 232 = 6*26 + 76.
Starting with offset 1 = eigensequence of triangle A128229. (End)
a(n) = (1/sqrt(2*Pi))*Integral_{x=-oo..oo} exp(-x^2/2)*(x+1)^n. - Groux Roland, Mar 14 2011
Row sums of |A096713|. a(n) = D^n(exp(x)) evaluated at x = 0, where D is the operator sqrt(1+2*x)*d/dx. Cf. A047974 and A080599. - Peter Bala, Dec 07 2011
From Sergei N. Gladkovskii, Dec 03 2011 - Oct 28 2013: (Start)
Continued fractions:
E.g.f.: 1+x*(2+x)/(2*G(0)-x*(2+x)) where G(k)=1+x*(x+2)/(2+2*(k+1)/G(k+1)).
G.f.: 1/(U(0) - x) where U(k) = 1 + x*(k+1) - x*(k+1)/(1 - x/U(k+1)).
G.f.: 1/Q(0) where Q(k) = 1 + x*k - x/(1 - x*(k+1)/Q(k+1)).
G.f.: -1/(x*Q(0)) where Q(k) = 1 - 1/x - (k+1)/Q(k+1).
G.f.: T(0)/(1-x) where T(k) = 1 - x^2*(k+1)/( x^2*(k+1) - (1-x)^2/T(k+1)). (End)
a(n) ~ (1/sqrt(2)) * exp(sqrt(n)-n/2-1/4) * n^(n/2) * (1 + 7/(24*sqrt(n))). - Vaclav Kotesovec, Mar 07 2014
a(n) = Sum_{k=0..n} s(n,k)*(-1)^(n-k)*2^k*B(k,1/2), where the s(n,k) are (signless) Stirling numbers of the first kind, and the B(n,x) = Sum_{k=0..n} S(n,k)*x^k are the Stirling polynomials, where the S(n,k) are the Stirling numbers of the second kind. - Emanuele Munarini, May 16 2014
a(n) = hyper2F0([-n/2,(1-n)/2],[],2). - Peter Luschny, Aug 21 2014
0 = a(n)*(+a(n+1) + a(n+2) - a(n+3)) + a(n+1)*(-a(n+1) + a(n+2)) for all n in Z. - Michael Somos, Aug 22 2014
From Peter Bala, Oct 06 2021: (Start)
a(n+k) == a(n) (mod k) for all n >= 0 and all positive odd integers k.
Hence for each odd k, the sequence obtained by taking a(n) modulo k is a periodic sequence and the exact period divides k. For example, taking a(n) modulo 7 gives the purely periodic sequence [1, 1, 2, 4, 3, 5, 6, 1, 1, 2, 4, 3, 5, 6, 1, 1, 2, 4, 3, 5, 6, ...] of period 7. For similar results see A047974 and A115329. (End)

A006882 Double factorials n!!: a(n) = n*a(n-2) for n > 1, a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 2, 3, 8, 15, 48, 105, 384, 945, 3840, 10395, 46080, 135135, 645120, 2027025, 10321920, 34459425, 185794560, 654729075, 3715891200, 13749310575, 81749606400, 316234143225, 1961990553600, 7905853580625, 51011754393600, 213458046676875, 1428329123020800
Offset: 0

Views

Author

Keywords

Comments

Product of pairs of successive terms gives factorials in increasing order. - Amarnath Murthy, Oct 17 2002
a(n) = number of down-up permutations on [n+1] for which the entries in the even positions are increasing. For example, a(3)=3 counts 2143, 3142, 4132. Also, a(n) = number of down-up permutations on [n+2] for which the entries in the odd positions are decreasing. For example, a(3)=3 counts 51423, 52413, 53412. - David Callan, Nov 29 2007
The double factorial of a positive integer n is the product of the positive integers <= n that have the same parity as n. - Peter Luschny, Jun 23 2011
For n even, a(n) is the number of ways to place n points on an n X n grid with pairwise distinct abscissa, pairwise distinct ordinate, and 180-degree rotational symmetry. For n odd, the number of ways is a(n-1) because the center point can be considered "fixed". For 90-degree rotational symmetry cf. A001813, for mirror symmetry see A000085, A135401, and A297708. - Manfred Scheucher, Dec 29 2017
Could be extended to include a(-1) = 1. But a(-2) is not defined, otherwise we would have 1 = a(0) = 0*a(-2). - Jianing Song, Oct 23 2019

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 8*x^4 + 15*x^5 + 48*x^6 + 105*x^7 + 384*x^8 + ...
		

References

  • Putnam Contest, 4 Dec. 2004, Problem A3.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisections are A000165 and A001147. These two entries have more information.
A diagonal of A202212.

Programs

  • Haskell
    a006882 n = a006882_list !! n
    a006882_list = 1 : 1 : zipWith (*) [2..] a006882_list
    -- Reinhard Zumkeller, Oct 23 2014
    
  • Magma
    DoubleFactorial:=func< n | &*[n..2 by -2] >; [ DoubleFactorial(n): n in [0..28] ]; // Klaus Brockhaus, Jan 23 2011
    
  • Maple
    A006882 := proc(n) option remember; if n <= 1 then 1 else n*A006882(n-2); fi; end;
    A006882 := proc(n) doublefactorial(n) ; end proc; seq(A006882(n),n=0..10) ; # R. J. Mathar, Oct 20 2009
    A006882 := n -> mul(k, k = select(k -> k mod 2 = n mod 2, [$1 .. n])):  seq(A006882(n), n = 0 .. 10); # Peter Luschny, Jun 23 2011
    A006882 := proc(n) if n=0 then 1 else mul(n-2*k, k=0..floor(n/2)-1); fi; end; # N. J. A. Sloane, May 27 2016
  • Mathematica
    Array[ #!!&, 40, 0 ]
    multiFactorial[n_, k_] := If[n < 1, 1, If[n < k + 1, n, n*multiFactorial[n - k, k]]]; Array[ multiFactorial[#, 2] &, 27, 0] (* Robert G. Wilson v, Apr 23 2011 *)
  • PARI
    {a(n) = prod(i=0, (n-1)\2, n - 2*i )} \\ Improved by M. F. Hasler, Nov 30 2013
    
  • PARI
    {a(n) = if( n<2, n>=0, n * a(n-2))}; /* Michael Somos, Apr 06 2003 */
    
  • PARI
    {a(n) = if( n<0, 0, my(E); E = exp(x^2 / 2 + x * O(x^n)); n! * polcoeff( 1 + E * x * (1 + intformal(1 / E)), n))}; /* Michael Somos, Apr 06 2003 */
    
  • Python
    from sympy import factorial2
    def A006882(n): return factorial2(n) # Chai Wah Wu, Apr 03 2021

Formula

a(n) = Product_{i=0..floor((n-1)/2)} (n - 2*i).
E.g.f.: 1+exp(x^2/2)*x*(1+sqrt(Pi/2)*erf(x/sqrt(2))). - Wouter Meeussen, Mar 08 2001
Satisfies a(n+3)*a(n) - a(n+1)*a(n+2) = (n+1)!. [Putnam Contest]
a(n) = n!/a(n-1). - Vaclav Kotesovec, Sep 17 2012
a(n) * a(n+3) = a(n+1) * (a(n+2) + a(n)). a(n) * a(n+1) = (n+1)!. - Michael Somos, Dec 29 2012
a(n) ~ c * n^((n+1)/2) / exp(n/2), where c = sqrt(Pi) if n is even, and c = sqrt(2) if n is odd. - Vaclav Kotesovec, Nov 08 2014
a(2*n) = 2^n*a(n)*a(n-1). a(2^n) = 2^(2^n - 1) * 1!! * 3!! * 7!! * ... * (2^(n-1) - 1)!!. - Peter Bala, Nov 01 2016
a(n) = 2^h*(2/Pi)^(sin(Pi*h)^2/2)*Gamma(h+1) where h = n/2. This analytical extension supports the view that a(-1) = 1 is a meaningful numerical extension. With this definition (-1/2)!! = Gamma(3/4)/Pi^(1/4). - Peter Luschny, Oct 24 2019
a(n) ~ (n+1/6)*sqrt((2/e)*(n/e)^(n-1)*(Pi/2)^(cos(n*Pi/2)^2)). - Peter Luschny, Oct 25 2019
Sum_{n>=0} 1/a(n) = A143280. - Amiram Eldar, Nov 10 2020
Sum_{n>=0} 1/(a(n)*a(n+1)) = e - 1. - Andrés Ventas, Apr 12 2021

A001813 Quadruple factorial numbers: a(n) = (2n)!/n!.

Original entry on oeis.org

1, 2, 12, 120, 1680, 30240, 665280, 17297280, 518918400, 17643225600, 670442572800, 28158588057600, 1295295050649600, 64764752532480000, 3497296636753920000, 202843204931727360000, 12576278705767096320000, 830034394580628357120000, 58102407620643984998400000
Offset: 0

Views

Author

Keywords

Comments

Counts binary rooted trees (with out-degree <= 2), embedded in plane, with n labeled end nodes of degree 1. Unlabeled version gives Catalan numbers A000108.
Define a "downgrade" to be the permutation which places the items of a permutation in descending order. We are concerned with permutations that are identical to their downgrades. Only permutations of order 4n and 4n+1 can have this property; the number of permutations of length 4n having this property are equinumerous with those of length 4n+1. If a permutation p has this property then the reversal of this permutation also has it. a(n) = number of permutations of length 4n and 4n+1 that are identical to their downgrades. - Eugene McDonnell (eemcd(AT)mac.com), Oct 26 2003
Number of broadcast schemes in the complete graph on n+1 vertices, K_{n+1}. - Calin D. Morosan (cd_moros(AT)alumni.concordia.ca), Nov 28 2008
Hankel transform is A137565. - Paul Barry, Nov 25 2009
The e.g.f. of 1/a(n) = n!/(2*n)! is (exp(sqrt(x)) + exp(-sqrt(x)) )/2. - Wolfdieter Lang, Jan 09 2012
From Tom Copeland, Nov 15 2014: (Start)
Aerated with intervening zeros (1,0,2,0,12,0,120,...) = a(n) (cf. A123023 and A001147), the e.g.f. is e^(t^2), so this is the base for the Appell sequence with e.g.f. e^(t^2) e^(x*t) = exp(P(.,x),t) (reverse A059344, cf. A099174, A066325 also). P(n,x) = (a. + x)^n with (a.)^n = a_n and comprise the umbral compositional inverses for e^(-t^2)e^(x*t) = exp(UP(.,x),t), i.e., UP(n,P(.,t)) = x^n = P(n,UP(.,t)), e.g., (P(.,t))^n = P(n,t).
Equals A000407*2 with leading 1 added. (End)
a(n) is also the number of square roots of any permutation in S_{4*n} whose disjoint cycle decomposition consists of 2*n transpositions. - Luis Manuel Rivera Martínez, Mar 04 2015
Self-convolution gives A076729. - Vladimir Reshetnikov, Oct 11 2016
For n > 1, it follows from the formula dated Aug 07 2013 that a(n) is a Zumkeller number (A083207). - Ivan N. Ianakiev, Feb 28 2017
For n divisible by 4, a(n/4) is the number of ways to place n points on an n X n grid with pairwise distinct abscissae, pairwise distinct ordinates, and 90-degree rotational symmetry. For n == 1 (mod 4), the number of ways is a((n-1)/4) because the center point can be considered "fixed". For 180-degree rotational symmetry see A006882, for mirror symmetry see A000085, A135401, and A297708. - Manfred Scheucher, Dec 29 2017

Examples

			The following permutations of order 8 and their reversals have this property:
  1 7 3 5 2 4 0 6
  1 7 4 2 5 3 0 6
  2 3 7 6 1 0 4 5
  2 4 7 1 6 0 3 5
  3 2 6 7 0 1 5 4
  3 5 1 7 0 6 2 4
		

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4, Section 7.2.1.6, Eq. 32.
  • L. C. Larson, The number of essentially different nonattacking rook arrangements, J. Recreat. Math., 7 (No. 3, 1974), circa pages 180-181.
  • Eugene McDonnell, "Magic Squares and Permutations" APL Quote-Quad 7.3 (Fall, 1976)
  • R. W. Robinson, Counting arrangements of bishops, pp. 198-214 of Combinatorial Mathematics IV (Adelaide 1975), Lect. Notes Math., 560 (1976).
  • 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).

Crossrefs

Programs

  • GAP
    List([0..20],n->Factorial(2*n)/Factorial(n)); # Muniru A Asiru, Nov 01 2018
    
  • Magma
    [Factorial(2*n)/Factorial(n): n in [0..20]]; // Vincenzo Librandi, Oct 09 2018
    
  • Maple
    A001813 := n->(2*n)!/n!;
    A001813 := n -> mul(k, k = select(k-> k mod 4 = 2,[$1 .. 4*n])):
    seq(A001813(n), n=0..16);  # Peter Luschny, Jun 23 2011
  • Mathematica
    Table[(2n)!/n!, {n,0,20}] (* Harvey P. Dale, May 02 2011 *)
  • Maxima
    makelist(binomial(n+n, n)*n!,n,0,30); /* Martin Ettl, Nov 05 2012 */
    
  • PARI
    a(n)=binomial(n+n,n)*n! \\ Charles R Greathouse IV, Jun 15 2011
    
  • PARI
    first(n) = x='x+O('x^n); Vec(serlaplace((1 - 4*x)^(-1/2))) \\ Iain Fox, Jan 01 2018 (corrected by Iain Fox, Jan 11 2018)
    
  • Python
    from math import factorial
    def A001813(n): return factorial(n<<1)//factorial(n) # Chai Wah Wu, Feb 14 2023
  • Sage
    [binomial(2*n,n)*factorial(n) for n in range(0, 17)] # Zerinvary Lajos, Dec 03 2009
    

Formula

E.g.f.: (1-4*x)^(-1/2).
a(n) = (2*n)!/n! = Product_{k=0..n-1} (4*k + 2) = A081125(2*n).
Integral representation as n-th moment of a positive function on a positive half-axis: a(n) = Integral_{x=0..oo} x^n*exp(-x/4)/(sqrt(x)*2*sqrt(Pi)) dx, n >= 0. This representation is unique. - Karol A. Penson, Sep 18 2001
Define a'(1)=1, a'(n) = Sum_{k=1..n-1} a'(n-k)*a'(k)*C(n, k); then a(n)=a'(n+1). - Benoit Cloitre, Apr 27 2003
With interpolated zeros (1, 0, 2, 0, 12, ...) this has e.g.f. exp(x^2). - Paul Barry, May 09 2003
a(n) = A000680(n)/A000142(n)*A000079(n) = Product_{i=0..n-1} (4*i + 2) = 4^n*Pochhammer(1/2, n) = 4^n*GAMMA(n+1/2)/sqrt(Pi). - Daniel Dockery (peritus(AT)gmail.com), Jun 13 2003
For asymptotics, see the Robinson paper.
a(k) = (2*k)!/k! = Sum_{i=1..k+1} |A008275(i,k+1)| * k^(i-1). - André F. Labossière, Jun 21 2007
a(n) = 12*A051618(a) n >= 2. - Zerinvary Lajos, Feb 15 2008
a(n) = A000984(n)*A000142(n). - Zerinvary Lajos, Mar 25 2008
a(n) = A016825(n-1)*a(n-1). - Roger L. Bagula, Sep 17 2008
a(n) = (-1)^n*A097388(n). - D. Morosan (cd_moros(AT)alumni.concordia.ca), Nov 28 2008
From Paul Barry, Jan 15 2009: (Start)
G.f.: 1/(1-2x/(1-4x/(1-6x/(1-8x/(1-10x/(1-... (continued fraction);
a(n) = (n+1)!*A000108(n). (End)
a(n) = Sum_{k=0..n} A132393(n,k)*2^(2n-k). - Philippe Deléham, Feb 10 2009
G.f.: 1/(1-2x-8x^2/(1-10x-48x^2/(1-18x-120x^2/(1-26x-224x^2/(1-34x-360x^2/(1-42x-528x^2/(1-... (continued fraction). - Paul Barry, Nov 25 2009
a(n) = A173333(2*n,n) for n>0; cf. A006963, A001761. - Reinhard Zumkeller, Feb 19 2010
From Gary W. Adamson, Jul 19 2011: (Start)
a(n) = upper left term of M^n, M = an infinite square production matrix as follows:
2, 2, 0, 0, 0, 0, ...
4, 4, 4, 0, 0, 0, ...
6, 6, 6, 6, 0, 0, ...
8, 8, 8, 8, 8, 0, ...
...
(End)
a(n) = (-2)^n*Sum_{k=0..n} 2^k*s(n+1,n+1-k), where s(n,k) are the Stirling numbers of the first kind, A048994. - Mircea Merca, May 03 2012
G.f.: 1/Q(0), where Q(k) = 1 + x*(4*k+2) - x*(4*k+4)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 18 2013
G.f.: 2/G(0), where G(k) = 1 + 1/(1 - x*(8*k+4)/(x*(8*k+4) - 1 + 8*x*(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 30 2013
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - 2*x/(2*x + 1/(2*k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 01 2013
D-finite with recurrence: a(n) = (4*n-6)*a(n-2) + (4*n-3)*a(n-1), n>=2. - Ivan N. Ianakiev, Aug 07 2013
Sum_{n>=0} 1/a(n) = (exp(1/4)*sqrt(Pi)*erf(1/2) + 2)/2 = 1 + A214869, where erf(x) is the error function. - Ilya Gutkovskiy, Nov 10 2016
Sum_{n>=0} (-1)^n/a(n) = 1 - sqrt(Pi)*erfi(1/2)/(2*exp(1/4)), where erfi(x) is the imaginary error function. - Amiram Eldar, Feb 20 2021
a(n) = 1/([x^n] hypergeom([1], [1/2], x/4)). - Peter Luschny, Sep 13 2024
a(n) = 2^n*n!*JacobiP(n, -1/2, -n, 3). - Peter Luschny, Jan 22 2025
G.f.: 2F0(1,1/2;;4x). - R. J. Mathar, Jun 07 2025

Extensions

More terms from James Sellers, May 01 2000

A000898 a(n) = 2*(a(n-1) + (n-1)*a(n-2)) for n >= 2 with a(0) = 1.

Original entry on oeis.org

1, 2, 6, 20, 76, 312, 1384, 6512, 32400, 168992, 921184, 5222208, 30710464, 186753920, 1171979904, 7573069568, 50305536256, 342949298688, 2396286830080, 17138748412928, 125336396368896, 936222729254912, 7136574106003456, 55466948299223040, 439216305474605056, 3540846129311916032
Offset: 0

Views

Author

Keywords

Comments

Number of solutions to the rook problem on a 2n X 2n board having a certain symmetry group (see Robinson for details).
Also the value of the n-th derivative of exp(x^2) evaluated at 1. - N. Calkin, Apr 22 2010
For n >= 1, a(n) is also the sum of the degrees of the irreducible representations of the group of n X n signed permutation matrices (described in sequence A066051). The similar sum for the "ordinary" symmetric group S_n is in sequence A000085. - Sharon Sela (sharonsela(AT)hotmail.com), Jan 12 2002
It appears that this is also the number of permutations of 1, 2, ..., n+1 such that each term (after the first) is within 2 of some preceding term. Verified for n+1 <= 6. E.g., a(4) = 20 because of the 24 permutations of 1, 2, 3, 4, the only ones not permitted are 1, 4, 2, 3; 1, 4, 3, 2; 4, 1, 2, 3; and 4, 1, 3, 2. - Gerry Myerson, Aug 06 2003
Hankel transform is A108400. - Paul Barry, Feb 11 2008
From Emeric Deutsch, Jun 19 2010: (Start)
Number of symmetric involutions of [2n]. Example: a(2)=6 because we have 1234, 2143, 1324, 3412, 4231, and 4321. See the Egge reference, pp. 419-420.
Number of symmetric involutions of [2n+1]. Example: a(2)=6 because we have 12345, 14325, 21354, 45312, 52341, and 54321. See the Egge reference, pp. 419-420.
(End)
Binomial convolution of sequence A000085: a(n) = Sum_{k=0..n} binomial(n,k)*A000085(k)*A000085(n-k). - Emanuele Munarini, Mar 02 2016
The sequence can be obtained from the infinite product of 2 X 2 matrices [(1,N); (1,1)] by extracting the upper left terms, where N = (1, 3, 5, ...), the odd integers. - Gary W. Adamson, Jul 28 2016
Apparently a(n) is the number of standard domino tableaux of size 2n, where a domino tableau is a generalized Young tableau in which all rows and columns are weakly increasing and all regions are dominos. - Gus Wiseman, Feb 25 2018

Examples

			G.f. = 1 + 2*x + 6*x^2 + 20*x^3 + 76*x^4 + 312*x^5 + 1384*x^6 + 6512*x^7 + ...
The a(3) = 20 domino tableaux:
1 1 2 2 3 3
.
1 2 2 3 3
1
.
1 2 3 3   1 1 3 3   1 1 2 2
1 2       2 2       3 3
.
1 1 3 3   1 1 2 2
2         3
2         3
.
1 2 3   1 2 2   1 1 3
1 2 3   1 3 3   2 2 3
.
1 3 3   1 2 2
1       1
2       3
2       3
.
1 2   1 1   1 1
1 2   2 3   2 2
3 3   2 3   3 3
.
1 3   1 2   1 1
1 3   1 2   2 2
2     3     3
2     3     3
.
1 1
2
2
3
3
.
1
1
2
2
3
3 - _Gus Wiseman_, Feb 25 2018
		

References

  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 3, Sect 5.1.4 Exer. 31.
  • L. C. Larson, The number of essentially different nonattacking rook arrangements, J. Recreat. Math., 7 (No. 3, 1974), circa pages 180-181.
  • R. W. Robinson, Counting arrangements of bishops, pp. 198-214 of Combinatorial Mathematics IV (Adelaide 1975), Lect. Notes Math., 560 (1976).
  • 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).

Crossrefs

Programs

  • Haskell
    a000898 n = a000898_list !! n
    a000898_list = 1 : 2 : (map (* 2) $
       zipWith (+) (tail a000898_list) (zipWith (*) [1..] a000898_list))
    -- Reinhard Zumkeller, Oct 10 2011
    
  • Maple
    # For Maple program see A000903.
    seq(simplify((-I)^n*HermiteH(n, I)), n=0..25); # Peter Luschny, Oct 23 2015
  • Mathematica
    a[n_] := Sum[ 2^k*StirlingS1[n, k]*BellB[k], {k, 0, n}]; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Nov 17 2011, after Vladeta Jovovic *)
    RecurrenceTable[{a[0]==1,a[1]==2,a[n]==2(a[n-1]+(n-1)a[n-2])},a,{n,30}] (* Harvey P. Dale, Aug 04 2012 *)
    Table[Abs[HermiteH[n, I]], {n, 0, 20}] (* Vladimir Reshetnikov, Oct 22 2015 *)
    a[ n_] := Sum[ 2^(n - 2 k) n! / (k! (n - 2 k)!), {k, 0, n/2}]; (* Michael Somos, Oct 23 2015 *)
  • Maxima
    makelist((%i)^n*hermite(n,-%i),n,0,12); /* Emanuele Munarini, Mar 02 2016 */
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( exp(2*x + x^2 + x * O(x^n)), n))}; /* Michael Somos, Feb 08 2004 */
    
  • PARI
    {a(n) = if( n<2, max(0, n+1), 2*a(n-1) + (2*n - 2) * a(n-2))}; /* Michael Somos, Feb 08 2004 */
    
  • PARI
    my(x='x+O('x^66)); Vec(serlaplace(exp(2*x+x^2))) \\ Joerg Arndt, Oct 04 2013
    
  • PARI
    {a(n) = sum(k=0, n\2, 2^(n - 2*k) * n! / (k! * (n - 2*k)!))}; /* Michael Somos, Oct 23 2015 */
    

Formula

a(n) = Sum_{m=0..n} |A060821(n,m)| = H(n,-i)*i^n, with the Hermite polynomials H(n,x); i.e., these are row sums of the unsigned triangle A060821.
E.g.f.: exp(x*(x + 2)).
a(n) = 2 * A000902(n) for n >= 1.
a(n) = Sum_{k=0..n} binomial(n,2k)*binomial(2k,k)*k!*2^(n-2k). - N. Calkin, Apr 22 2010
Binomial transform of A047974. - Paul Barry, May 09 2003
a(n) = Sum_{k=0..n} Stirling1(n, k)*2^k*Bell(k). - Vladeta Jovovic, Oct 01 2003
From Paul Barry, Aug 29 2005: (Start)
a(n) = Sum_{k=0..floor(n/2)} A001498(n-k, k) * 2^(n-k).
a(n) = Sum_{k=0..n} A001498((n+k)/2, (n-k)/2) * 2^((n+k)/2) * (1+(-1)^(n-k))/2. (End)
For asymptotics, see the Robinson paper. [This is disputed by Yen-chi R. Lin. See below, Sep 30 2013.]
a(n) = Sum_{k=0..floor(n/2)} 2^(n-2*k) * C(n,2*k) * (2*k)!/k!. - Paul Barry, Feb 11 2008
G.f.: 1/(1 - 2*x - 2*x^2/(1 - 2*x - 4*x^2/(1 - 2*x - 6*x^2/(1 - 2*x - 8*x^2/(1 - ... (continued fraction). - Paul Barry, Feb 25 2010
E.g.f.: exp(x^2 + 2*x) = Q(0); Q(k) = 1 + (x^2 + 2*x)/(2*k + 1 - (x^2 + 2*x)*(2*k + 1)/((x^2 + 2*x) + (2*k + 2)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 24 2011
G.f.: 1/Q(0), where Q(k) = 1 + 2*x*k - x - x/(1 - 2*x*(k + 1)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Mar 07 2013
a(n) = (2*n/e)^(n/2) * exp(sqrt(2*n)) / sqrt(2*e) * (1 + sqrt(2/n)/3 + O(n^(-1))). - Yen-chi R. Lin, Sep 30 2013
0 = a(n)*(2*a(n+1) + 2*a(n+2) - a(n+3)) + a(n+1)*(-2*a(n+1) + a(n+2)) for all n >= 0. - Michael Somos, Oct 23 2015
a(n) = Sum_{k=0..floor(n/2)} 2^(n-k)*B(n, k), where B are the Bessel numbers A100861. - Peter Luschny, Jun 04 2021

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Feb 21 2001
Initial condition a(0)=1 added to definition by Jon E. Schoenfield, Oct 01 2013
More terms from Joerg Arndt, Oct 04 2013

A297708 Number of permutations p of [n] such that p(p(i)) = i for all i or p(n+1-p(i)) = n+1-i for all i.

Original entry on oeis.org

1, 1, 2, 6, 14, 46, 132, 444, 1452, 5164, 18680, 71080, 278920, 1135624, 4774448, 20692560, 92381072, 423566224, 1994458656, 9619233888, 47516407008, 239904464608, 1237764055616, 6515682543040, 34984350444736, 191360856810688, 1065970229647232, 6041353305197184
Offset: 0

Views

Author

Manfred Scheucher, Jan 03 2018

Keywords

Comments

a(n) is likewise the number of ways to place n points on an n X n grid with pairwise distinct abscissa, pairwise distinct ordinate, and mirror symmetry using one or the other of the diagonals of the grid as axis of symmetry. See also A000085 and A135401. For rotational symmetry see A001813 and A006882.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<7, [1$2, 2, 6, 14, 46, 132][n+1],
          ((-25*n+149)*a(n-1)+(2*(10*n^2-7*n-106))*a(n-2)+
           (45*n^2-268*n+298)*a(n-3)-(2*(10*n^2-7*n-61))*a(n-4)
           -(65*n^2-367*n+522)*a(n-5)-(2*(10*n^3-67*n^2+96*n+1))*a(n-6)
           -(45*n-113)*(n-4)*(n-6)*a(n-7))/(20*n-79))
        end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Jan 07 2018
  • Mathematica
    a[n_] := 2*Sum[2^k*BellB[k, 1/2]*StirlingS1[n, k], {k, 0, n}] - Sum[2^k*BellB[k]*StirlingS1[Floor[n/2], k], {k, 0, Floor[n/2]}];
    Array[a, 30, 0] (* Jean-François Alcover, May 29 2019 *)
  • SageMath
    def a135401(n): return sum( binomial(floor(n/2),2*k)*binomial(2*k,k)*factorial(k)*2^(floor(n/2)-2*k) for k in range(1+floor(n/4)))
    def a85(n): return sum( factorial(n) / (factorial(n-2*k) * 2^k * factorial(k)) for k in range(1+floor(n/2)))
    def a297708(n): return 2*a85(n) - a135401(n)
    for n in range(100): print(n, a297708(n))

Formula

a(n) = 2*A000085(n) - A135401(n). (Proof: A000085 counts the permutations satisfying the first condition as well as the permutations satisfying the second condition. A135401 counts the permutations satisfying both conditions.)

A123071 Bishops on a 2n+1 X 2n+1 board (see Robinson paper for details).

Original entry on oeis.org

1, 2, 4, 12, 36, 120, 400, 1520, 5776, 23712, 97344, 431808, 1915456, 9012608, 42406144, 210988800, 1049760000, 5475340800, 28558296064, 155672726528, 848579961856, 4810614454272, 27271456395264, 160376430784512, 943132599095296, 5735299537018880
Offset: 0

Views

Author

N. J. A. Sloane, Sep 28 2006

Keywords

Crossrefs

Programs

  • Maple
    For Maple program see A005635.
    # alternative
    # this is A000898, replicated as 1,1,2,2,6,6,20,20,76,76,...
    B := proc(n)
        if n=0 or n= -2 then
            1 ;
        elif type (n,'odd') then
            procname(n-1) ;
        else
            2*procname(n-2)+(n-2)*procname(n-4) ;
        end if;
    end proc:
    A123071 := proc(n)
        B(n)*B(n+1) ;
    end proc:
    seq(A123071(n),n=0..20) ; # R. J. Mathar, Apr 02 2017
  • Mathematica
    B[n_] := B[n] = Which[n == 0 || n == -2, 1, OddQ[n], B[n-1], True, 2*B[n-2] + (n-2)*B[n-4]];
    a[n_] := B[n]*B[n+1];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Jul 23 2022, after R. J. Mathar *)

Formula

Conjecture: 2*a(n) +a(n-1) -2*n*a(n-2) +(-n-10)*a(n-3) -2*(n-2)*(n+2)*a(n-4) +(-n^2-2*n+23)*a(n-5) +2*(n-5)*(n^2-7*n+11)*a(n-6) +(n-6)*(n-5)^2*a(n-7)=0. - R. J. Mathar, Apr 02 2017

A370396 Number of nonnegative integer matrices with sum of entries equal to 2*n or 2*n+1, no zero rows or columns, which are symmetric about both diagonals.

Original entry on oeis.org

1, 3, 13, 63, 347, 2061, 13219, 89877, 646009, 4866339, 38305573, 313535631, 2661927255, 23367856281, 211680786375, 1974332847177, 18929186519705, 186249976522155, 1878195826349765, 19386702579997095, 204603867473735387, 2205553917952342605, 24261717301000314867
Offset: 0

Views

Author

Ludovic Schwob, Feb 17 2024

Keywords

Comments

a(n) is the number of semistandard Young tableaux of size 2*n or 2*n+1 with consecutive entries (i.e., if i is in T, and 1<=j<=i, then j is in T) which are invariant under Schützenberger involution.

Examples

			The a(2) = 13 matrices with sum of entries equal to 4:
  [4]
.
  [2 0] [1 1] [0 2]
  [0 2] [1 1] [2 0]
.
  [1 0 0] [0 0 1] [0 1 0]
  [0 2 0] [0 2 0] [1 0 1]
  [0 0 1] [1 0 0] [0 1 0]
.
  [1 0 0 0] [0 0 0 1] [1 0 0 0]
  [0 1 0 0] [0 1 0 0] [0 0 1 0]
  [0 0 1 0] [0 0 1 0] [0 1 0 0]
  [0 0 0 1] [1 0 0 0] [0 0 0 1]
.
  [0 0 0 1] [0 1 0 0] [0 0 1 0]
  [0 0 1 0] [1 0 0 0] [0 0 0 1]
  [0 1 0 0] [0 0 0 1] [1 0 0 0]
  [1 0 0 0] [0 0 1 0] [0 1 0 0]
		

Crossrefs

Cf. A135401.

Programs

  • SageMath
    nmax = 20
    R. = PowerSeriesRing(QQ)
    S = [R(1)]
    for k in range(nmax+1):
        S.append(sum(S[i]*binomial(k,i)*x^(2*(k-i)) for i in range(k+1))/(1-x^2+O(x^(nmax+1)))^k/(1-x+O(x^(nmax+1)))-S[k])
    print(sum(1/(1-x+O(x^(nmax+1)))/(1-x^2+O(x^(nmax+1)))^n*sum(x^(2*(n-k))*factorial(n)/factorial(n-k)/factorial(k-i)/factorial(k-j)/factorial(i+j-k)*S[i]*S[j] for k in range(n+1) for i in range(k+1) for j in range(k-i,k+1)) for n in range(nmax+1)).coefficients())
Showing 1-7 of 7 results.