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.

Previous Showing 31-40 of 71 results. Next

A156992 Triangle T(n,k) = n!*binomial(n-1, k-1) for 1 <= k <= n, read by rows.

Original entry on oeis.org

1, 2, 2, 6, 12, 6, 24, 72, 72, 24, 120, 480, 720, 480, 120, 720, 3600, 7200, 7200, 3600, 720, 5040, 30240, 75600, 100800, 75600, 30240, 5040, 40320, 282240, 846720, 1411200, 1411200, 846720, 282240, 40320, 362880, 2903040, 10160640, 20321280, 25401600, 20321280, 10160640, 2903040, 362880
Offset: 1

Views

Author

Roger L. Bagula, Feb 20 2009

Keywords

Comments

Partition {1,2,...,n} into m subsets, arrange (linearly order) the elements within each subset, then arrange the subsets. - Geoffrey Critzer, Mar 05 2010
From Dennis P. Walsh, Nov 26 2011: (Start)
Number of ways to arrange n different books in a k-shelf bookcase leaving no shelf empty.
There are n! ways to arrange the books in one long line. With ni denoting the number of books for shelf i, we have n = n1 + n2 + ... + nk. Since the number of compositions of n with k summands is binomial(n-1,k-1), we obtain T(n,k) = n!*binomial(n-1,k-1) for the number of ways to arrange the n books on the k shelves.
Equivalently, T(n,k) is the number of ways to stack n different alphabet blocks into k labeled stacks.
Also, T(n,k) is the number of injective functions f:[n]->[n+k] such that (i) the pre-image of (n+j) exists for j=1..k and (ii) f has no fixed points, that is, for all x, f(x) does not equal x.
T(n,k) is the number of labeled, rooted forests that have (i) exactly k roots, (ii) each root labeled larger than any nonroot, (iii) each root with exactly one child node, (iv) n non-root nodes, and (v) at most one child node for each node in the forest.
(End)
Essentially, the triangle given by (2,1,3,2,4,3,5,4,6,5,7,6,8,7,9,8,...) DELTA (2,1,3,2,4,3,5,4,6,5,7,6,8,7,9,8,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 29 2011
T(n,j+k) = Sum_{i=j..n-k} binomial(n,i)*T(i,j)*T(n-i,k). - Dennis P. Walsh, Nov 29 2011

Examples

			The triangle starts:
      1;
      2,      2;
      6,     12,      6;
     24,     72,     72,      24;
    120,    480,    720,     480,     120;
    720,   3600,   7200,    7200,    3600,    720;
   5040,  30240,  75600,  100800,   75600,  30240,   5040;
  40320, 282240, 846720, 1411200, 1411200, 846720, 282240, 40320;
From _Dennis P. Walsh_, Nov 26 2011: (Start)
T(3,2) = 12 since there are 12 ways to arrange books b1, b2, and b3 on shelves <shelf1><shelf2>:
   <b1><b2,b3>, <b1><b3,b2>, <b2><b1,b3>, <b2><b3,b1>,
   <b3><b1,b2>, <b3><b2,b1>, <b2,b3><b1>, <b3,b2><b1>,
   <b1,b3><b2>, <b3,b1><b2>, <b1,b2><b3>, <b2,b1><b3>.
(End)
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 98

Crossrefs

Cf. A002866 (row sums).
Column 1 = A000142. Column 2 = A001286 * 2! = A062119. Column 3 = A001754 * 3!. Column 4 = A001755 * 4!. Column 5 = A001777 * 5!. Column 6 = A001778 * 6!. Column 7 = A111597 * 7!. Column 8 = A111598 * 8!. Cf. A105278. - Geoffrey Critzer, Mar 05 2010
T(2n,n) gives A123072.

Programs

  • Magma
    [Factorial(n)*Binomial(n-1,k-1): k in [1..n], n in [1..10]]; // G. C. Greubel, May 10 2021
    
  • Maple
    seq(seq(n!*binomial(n-1,k-1),k=1..n),n=1..10); # Dennis P. Walsh, Nov 26 2011
    with(PolynomialTools): p := (n,x) -> (n+1)!*hypergeom([-n],[],-x);
    seq(CoefficientList(simplify(p(n,x)),x),n=0..5); # Peter Luschny, Apr 08 2015
  • Mathematica
    Table[n!*Binomial[n-1, k-1], {n,10}, {k,n}]//Flatten
  • Sage
    flatten([[factorial(n)*binomial(n-1,k-1) for k in (1..n)] for n in (1..10)]) # G. C. Greubel, May 10 2021

Formula

E.g.f. for column k is (x/(1-x))^k. - Geoffrey Critzer, Mar 05 2010
T(n,k) = A000142(n)*A007318(n-1,k-1). - Dennis P. Walsh, Nov 26 2011
Coefficient triangle of the polynomials p(n,x) = (n+1)!*hypergeom([-n],[],-x). - Peter Luschny, Apr 08 2015

A278678 Popularity of left children in treeshelves avoiding pattern T321.

Original entry on oeis.org

1, 4, 19, 94, 519, 3144, 20903, 151418, 1188947, 10064924, 91426347, 887296422, 9164847535, 100398851344, 1162831155151, 14198949045106, 182317628906283, 2455925711626404, 34632584722468115, 510251350142181470, 7840215226100517191, 125427339735162102104
Offset: 2

Views

Author

Sergey Kirgizov, Nov 26 2016

Keywords

Comments

Treeshelves are ordered binary (0-1-2) increasing trees where every child is connected to its parent by a left or a right link. Classical Françon's bijection maps bijectively treeshelves into permutations. Pattern T321 illustrated below corresponds to a treeshelf constructed from permutation 321. Popularity is the sum of a certain statistic (number of left children, in this case) over all objects of size n.

Examples

			Treeshelves of size 3:
      1  1          1    1       1        1
     /    \        /      \     / \      / \
    2      2      /        \   2   \    /   2
   /        \    2          2       3  3
  3          3    \        /
                   3      3
Pattern T321:
      1
     /
    2
   /
  3
Treeshelves of size 3 that avoid pattern T321:
  1          1    1       1        1
   \        /      \     / \      / \
    2      /        \   2   \    /   2
     \    2          2       3  3
      3    \        /
            3      3
Popularity of left children is 4.
		

Crossrefs

Programs

  • Maple
    b:= proc(u, o) option remember; `if`(u+o=0, 1,
          add(b(o-1+j, u-j), j=1..u))
        end:
    a:= n-> (n+1)*b(n+1, 0)-b(n+2, 0):
    seq(a(n), n=2..25);  # Alois P. Heinz, Oct 27 2017
  • Mathematica
    b[u_, o_] := b[u, o] = If[u+o == 0, 1, Sum[b[o-1+j, u-j], {j, 1, u}]];
    a[n_] := (n+1)*b[n+1, 0] - b[n+2, 0];
    Table[a[n], {n, 2, 25}] (* Jean-François Alcover, Nov 06 2017, after Alois P. Heinz *)
  • Python
    # by Taylor expansion
    from sympy import *
    from sympy.abc import z
    h = (-sin(z) + 1 + (z-1)*cos(z))/ (1-sin(z))**2
    NUMBER_OF_COEFFS = 20
    coeffs = Poly(series(h,n = NUMBER_OF_COEFFS)).coeffs()
    coeffs.reverse()
    # and remove first coefficient 1 that corresponds to O(n**k)
    coeffs.pop(0)
    print([coeffs[n]*factorial(n+2) for n in range(len(coeffs))])

Formula

E.g.f.: (-sin(z) + 1 + (z-1)*cos(z))/ (1-sin(z))^2.
a(n) = (n+1)*e(n) - e(n+1), where e(n) is the n-th Euler number (see A000111).
Asymptotic: a(n) ~ 8*(Pi-2) / Pi^3 * n^2 * (2/Pi)^n.

A332724 Number of length n - 1 ordered set partitions of {1..n} where no element of any block is greater than any element of a non-adjacent consecutive block.

Original entry on oeis.org

0, 0, 1, 6, 14, 32, 65, 128, 243, 452, 826, 1490, 2659, 4704, 8261, 14418, 25030, 43252, 74437, 127648, 218199, 371920, 632306, 1072486, 1815239, 3066432, 5170825, 8705118, 14632958, 24562952, 41177801, 68947520, 115313979, 192656924, 321554986, 536191418
Offset: 0

Views

Author

Gus Wiseman, Mar 03 2020

Keywords

Comments

In other words, parts of not-immediately-subsequent blocks are increasing.

Examples

			The a(2) = 1 through a(4) = 14 ordered set partitions:
  {{1,2}}  {{1},{2,3}}  {{1},{2},{3,4}}
           {{1,2},{3}}  {{1},{2,3},{4}}
           {{1,3},{2}}  {{1,2},{3},{4}}
           {{2},{1,3}}  {{1},{2,4},{3}}
           {{2,3},{1}}  {{1,2},{4},{3}}
           {{3},{1,2}}  {{1},{3},{2,4}}
                        {{1,3},{2},{4}}
                        {{1},{3,4},{2}}
                        {{1},{4},{2,3}}
                        {{2},{1},{3,4}}
                        {{2},{1,3},{4}}
                        {{2},{1,4},{3}}
                        {{2,3},{1},{4}}
                        {{3},{1,2},{4}}
		

Crossrefs

Column k = n - 1 of A332673, which has row-sums A332872.
Ordered set-partitions are A000670.
Unimodal compositions are A001523.
Unimodal normal sequences appear to be A007052.
Non-unimodal normal sequences are A328509.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[Join@@Permutations/@sps[Range[n]],Length[#]==n-1&&!MatchQ[#,{_,{_,a_,_},,{_,b_,_},_}/;a>b]&]],{n,0,8}]
  • PARI
    \\ here b(n) is A001629(n).
    b(n) = {((n+1)*fibonacci(n-1) + (n-1)*fibonacci(n+1))/5}
    a(n) = {if(n==0, 0, b(n) + 4*b(n-1) + b(n-2))} \\ Andrew Howroyd, Apr 17 2021

Formula

From Andrew Howroyd, Apr 17 2021: (Start)
a(n) = A001629(n) + 4*A001629(n+1) + A001629(n+2) for n > 0.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4) for n > 4.
G.f.: x*(1 + 4*x + x^2)/(1 - x - x^2)^2.
(End)

Extensions

Terms a(9) and beyond from Andrew Howroyd, Apr 17 2021

A055303 Number of labeled rooted trees with n nodes and 2 leaves.

Original entry on oeis.org

3, 36, 360, 3600, 37800, 423360, 5080320, 65318400, 898128000, 13172544000, 205491686400, 3399953356800, 59499183744000, 1098446469120000, 21341245685760000, 435361411989504000, 9305850181275648000, 208013121699102720000, 4853639506312396800000
Offset: 3

Views

Author

Christian G. Bower, May 11 2000

Keywords

Comments

a(n+1) is the sum of the zero moments over all permutations of n. E.g., a(4) is [1,2,3].[0,1,2] + [1,3,2].[0,1,2] + [2,1,3].[0,1,2] + [2,3,1].[0,1,2] + [3,1,2].[0,1,2] + [3,2,1].[0,1,2] = 8 + 7 + 7 + 5 + 5 + 4 = 36. - Jon Perry, Feb 20 2004
a(n) is the number of pairs of elements (p(i),p(j)) in an n-permutation such that i > j and p(i) < p(j) where j is not equal to i-1. Loosely speaking, we could say: the number of inversions that are not descents. A055303 + A001286 = A001809. For example, a(3)=3 from the permutations (given in one line notation): (2,3,1), (3,1,2), (3,2,1) we have the pairs (1,2), (2,3) and (1,3) respectively. - Geoffrey Critzer, Jan 06 2013

Crossrefs

Column 2 of A055302.

Programs

  • Maple
    seq(n!*(n-2)*(n-1)/4, n = 3..21); # Zerinvary Lajos, Apr 25 2008 [corrected by Georg Fischer, Aug 17 2021]
    f:= gfun:-rectoproc({(n-3)*a(n) - (n^2-n)*a(n-1), a(3)=3}, a(n), remember): map(f, [$3..20]); # Georg Fischer, Aug 17 2021
  • Mathematica
    With[{nn=20}, Drop[CoefficientList[Series[x^3/(2(1-x)^3), {x,0,nn}], x] * Range[0,nn]!, 3]] (* Harvey P. Dale, Nov 22 2012 *)

Formula

E.g.f.: x^3/(2*(1-x)^3).
a(n) = (n-2)!*t(n-2)*t(n-1) = (n-2)!*(n-2)*(n-1)^2*n/4 = n!*(n-2)*(n-1)/4 = n!*t(n-2)/2 where t = A000217. - Jon Perry, Feb 22 2004
D-finite with recurrence: (n-3)*a(n) - (n^2 - n)*a(n-1) = 0. - Georg Fischer, Aug 17 2021
a(n) = 3 * A001754(n). - Alois P. Heinz, Aug 17 2021

A207324 List of permutations of 1,2,3,...,n for n=1,2,3,..., in the order they are output by Steinhaus-Johnson-Trotter algorithm.

Original entry on oeis.org

1, 1, 2, 2, 1, 1, 2, 3, 1, 3, 2, 3, 1, 2, 3, 2, 1, 2, 3, 1, 2, 1, 3, 1, 2, 3, 4, 1, 2, 4, 3, 1, 4, 2, 3, 4, 1, 2, 3, 4, 1, 3, 2, 1, 4, 3, 2, 1, 3, 4, 2, 1, 3, 2, 4, 3, 1, 2, 4, 3, 1, 4, 2, 3, 4, 1, 2, 4, 3, 1, 2, 4, 3, 2, 1, 3, 4, 2, 1, 3, 2, 4, 1, 3, 2, 1, 4
Offset: 1

Views

Author

R. J. Cano, Sep 14 2012

Keywords

Comments

This table is otherwise similar to A030298, but lists permutations in the order given by the Steinhaus-Trotter-Johnson algorithm. - Antti Karttunen, Dec 28 2012

Examples

			For the set of the first two natural numbers {1,2} the unique permutations possible are 12 and 21, concatenated with 1 for {1} the resulting sequence would be 1, 1, 2, 2, 1.
If we consider up to 3 elements {1,2,3}, we have 123, 132, 312, 321, 231, 213 and the concatenation gives: 1, 1, 2, 2, 1, 1, 2, 3, 1, 3, 2, 3, 1, 2, 3, 2, 1, 2, 3, 1, 2, 1, 3.
Up to N concatenations, the sequence will have a total of Sum_{k=1..N} (k! * k) = (N+1)! - 1 = A033312(N+1) terms.
		

Crossrefs

Cf. A001563 (row lengths), A001286 (row sums).
Pair (A130664(n),A084555(n)) = (1,1),(2,3),(4,5),(6,8),(9,11),(12,14),... gives the starting and ending offsets of the n-th permutation in this list.

Extensions

A278679 Popularity of left children in treeshelves avoiding pattern T213.

Original entry on oeis.org

1, 5, 24, 128, 770, 5190, 38864, 320704, 2894544, 28382800, 300575968, 3419882304, 41612735632, 539295974000, 7417120846080, 107904105986048, 1655634186628352, 26721851169634560, 452587550053179392, 8026445538106839040, 148751109541600495104
Offset: 2

Views

Author

Sergey Kirgizov, Nov 26 2016

Keywords

Comments

Treeshelves are ordered binary (0-1-2) increasing trees where every child is connected to its parent by a left or a right link. Classical Françon's bijection maps bijectively treeshelves into permutations. Pattern T213 illustrated below corresponds to a treeshelf constructed from permutation 213. Popularity is the sum of a certain statistic (number of left children, in this case) over all objects of size n.

Examples

			Treeshelves of size 3:
      1  1          1    1       1        1
     /    \        /      \     / \      / \
    2      2      /        \   2   \    /   2
   /        \    2          2       3  3
  3          3    \        /
                   3      3
Pattern T213:
    1
   / \
  2   \
       3
Treeshelves of size 3 that avoid pattern T213:
      1  1          1    1        1
     /    \        /      \      / \
    2      2      /        \    /   2
   /        \    2          2  3
  3          3    \        /
                   3      3
Popularity of left children is 5.
		

Crossrefs

Programs

  • Mathematica
    terms = 21;
    egf = (E^(Sqrt[2] z)(4z - 4) - (Sqrt[2] - 2) E^(2 Sqrt[2] z) + Sqrt[2] + 2)/((Sqrt[2] - 2) E^(Sqrt[2] z) + 2 + Sqrt[2])^2;
    CoefficientList[egf + O[z]^(terms + 2), z]*Range[0, terms + 1]! // Round // Drop[#, 2]& (* Jean-François Alcover, Jan 26 2019 *)
  • Python
    ## by Taylor expansion
    from sympy import *
    from sympy.abc import z
    h = (exp(sqrt(2)*z) * (4*z-4) - (sqrt(2)-2)*exp(2*sqrt(2)*z) + sqrt(2) + 2) / ((sqrt(2)-2)*exp(sqrt(2)*z) + 2 + sqrt(2))**2
    NUMBER_OF_COEFFS = 20
    coeffs = Poly(series(h,n = NUMBER_OF_COEFFS)).coeffs()
    coeffs.reverse()
    ## and remove first coefficient 1 that corresponds to O(n**k)
    coeffs.pop(0)
    print([coeffs[n]*factorial(n+2) for n in range(len(coeffs))])

Formula

E.g.f.: (e^(sqrt(2)*z) * (4*z-4) - (sqrt(2)-2)*e^(2*sqrt(2)*z) + sqrt(2) + 2) / ((sqrt(2)-2)*e^(sqrt(2)*z) + 2 + sqrt(2))^2.
Asymptotic: n * (sqrt(2) / log(2*sqrt(2)+3) )^(n+1).

Extensions

More terms from Alois P. Heinz, Oct 27 2017

A102625 Triangle read by rows: T(n,k) is the sum of the weights of all vertices labeled k at depth n in the Catalan tree (1 <= k <= n+1, n >= 0).

Original entry on oeis.org

1, 1, 2, 3, 6, 6, 15, 30, 36, 24, 105, 210, 270, 240, 120, 945, 1890, 2520, 2520, 1800, 720, 10395, 20790, 28350, 30240, 25200, 15120, 5040, 135135, 270270, 374220, 415800, 378000, 272160, 141120, 40320, 2027025, 4054050, 5675670, 6486480
Offset: 0

Views

Author

Emeric Deutsch, Jan 31 2005

Keywords

Comments

The Catalan tree is defined as follows: the root is labeled 1 and each vertex labeled i has i+1 children labeled 1,2,...,i+1. The weight of a vertex v is the product of all labels on the path from the root to v. Row n contains n+1 terms. Row sums and column 1 yield the double factorials (A001147). T(n,n+1)=(n+1)!, T(n,n)=n(n+1)!/2 (A001286; Lah numbers).
This table counts permutations of the multiset {1,1,2,2,...,n,n} satisfying the condition "the first appearance of i + 1 follows the first appearance of i" by the position of the first appearance of n. Specifically, T(n+1,k) is the number of such permutations for which n first occurs in position 2n+1-k. For example, with n=2 and k=1, T(3,1)=6 counts 121323, 121332, 122313, 122331, 112323, 112332. - David Callan, Nov 29 2007
T(n+1,k) is also the number of rooted complete binary forests with n labeled leaves and k labeled roots. This follows by comparing exponential generating functions; see Example 5.2.6 and Proposition 5.1.3 of Stanley's "Enumerative Combinatorics 2." - Timothy Y. Chow, Mar 28 2017

Examples

			Triangle starts:
   1;
   1,  2;
   3,  6,  6;
  15, 30, 36, 24;
  ...
Production matrix begins:
1, 2
1, 2, 3
1, 2, 3, 4
1, 2, 3, 4, 5
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 5, 6, 7
1, 2, 3, 4, 5, 6, 7, 8
1, 2, 3, 4, 5, 6, 7, 8, 9
... - _Philippe Deléham_, Sep 30 2014
From _Peter Bala_, Apr 16 2017: (Start)
The Catalan tree starts          o1
                                / \
                               /   \
                              /     \
                             /       \
                            /         \
                           o1          o2
                          / \         /|\
                         /   \       / | \
                        /     \     /  |  \
                       o1      o2  o1  o2  o3
Level 2:
2 vertices labeled 1: total weight 1x1x1 + 1x2x1 = 3
2 vertices labeled 2: total weight 2x1x1 + 2x2x1 = 6
1 vertex labeled 3:   total weight 3x2x1         = 6
(End)
		

Crossrefs

Programs

  • Maple
    A102625:=proc(n,k) if k<=n+1 then k*(2*n-k+1)!/2^(n-k+1)/(n-k+1)! else 0 fi end proc:
    for n from 0 to 8 do seq(A102625(n,k),k=1..n+1) od; # yields sequence in triangular form
  • Mathematica
    t[n_, k_] := k*(2n-k+1)!/(2^(n-k+1)*(n-k+1)!); Table[t[n, k], {n, 0, 8}, {k, 1, n+1}] // Flatten (* Jean-François Alcover, Jan 21 2013 *)
  • PARI
    {T(n, k) = my(m = n-k+1); if( k<1 || k>n+1, 0, k * (n+m)! / (2^m * m!))}; /* Michael Somos, Aug 16 2016 */

Formula

T(n,k) = k*(2*n-k+1)!/[2^(n-k+1)*(n-k+1)!] (1 <= k <= n+1).
From Tom Copeland, Nov 11 2007: (Start)
Bivariate G.F.: exp[P(.,t)*x] = D_x {1 - [g(x)/(1+t*g(x))]} = 1 / {(1+g(x))*[1+t*g(x)]^2}, where g(x) = sqrt(1-2*x) - 1 and P(n,t) = Sum_{k=0..n} T(n,k) * t^k.
Also D_x g(x) = -(1-2*x)^(-1/2) = -exp[x*A001147(.)] = -exp[x *(2*(.)-1)!! ], so the coefficients of x^n/n! in the expansion of g(x) are -(2*(n-1)-1)!! = -A001147(n-1) for n > 0.
See A132382 for an array which is essentially the revert from which this G.f. may be derived and for connections to other arrays. (End)
E.g.f.: 1/(1 - x + x*sqrt(1-2*z)) = 1 + x*z + (x+2*x^2)*z^2/2! + (3*x+6*x^2+6*x^3)*z^3/3! + .... T(n,k) gives the number of plane recursive trees on n+2 nodes where the root has degree k (Bergeron et al., Corollary 5). - Peter Bala, Jul 09 2012
From Peter Bala, Jul 09 2014: (Start)
T(n,k) = k!*A001497(n,k) modulo offset differences.
The n-th row polynomial R(n,x) = (-1)^n/(x - 1)*( Sum_{k = 1..infinity} k*(k - 2)*...*(k - 2*n)*(x/(x - 1))^k ). Cf. the Dobinski-type formula for the row polynomials of A001497. (End)
From Tom Copeland, Aug 06 2016: (Start)
From the 2007 formulas above, an alternate g.f. for this entry is GF(x,t) = -g(x) / [1 + t*g(x)] = x + (1 + 2*t)*x^2/2! + (3 + 6*t + 6*t^2)*x^3/3! + ... with compositional inverse GFinv(x,t) = {1 - [1 - x / (1+t*x)]^2} / 2 = -(1/2)[x / (1+t*x)]^2 + x / (1+t*x) = Sum_{n>0} (-1)^(n+1) [(n-1)/2*t^(n-2) + t^(n-1)]*x^n, a series containing the Lah numbers A001286 when expressed as an e.g.f.
From A145271, with K(x,t) = 1 / dGinv(x,t)/dx = 1 + (1+2*t) x + (1+t+t^2) x^2 + x^3 / [1-(1-t)*x], then [K(x,t) d/dx]^n x evaluated at x=0 gives the n-th row polynomial of this entry.
Since the reciprocal of Bala's e.g.f. above generates a shifted, signed A001147, for the polynomials P(n,t) generated by Bala's e.g.f., umbrally (P(.,t) + a.)^n = 0 for n > 0 with a_0 = 1 and a_n = -t * A001147(n-1) for n > 0. E.g., (P(.,t) + a.)^2 = a_0 * P(2,t) + 2 a_1 * P(1,t) + a_2 * P(0,t) = 1 * (t + 2*t^2) + 2 * -t * t + -t * 1 = 0. (End)
From Peter Bala, Apr 16 2017: (Start)
T(n,k) = k*T(n-1,k-1) + (2*n - k)*T(n-1,k).
E.g.f.: t*x*c(x/2)/(1 - t*x*c(x/2)) = t*x + (t + 2*t^2)*x^2/2! + (3*t + 6*t^2 + 6*t^2)*x^3/3! + ..., where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. for the Catalan numbers A000108. Note that the related g.f. t*x*c(x)/(1 - t*x*c(x)) is the o.g.f. for A033184 (essentially the same as the Riordan array A106566) and enumerates the number of vertices labeled k on the n_th level of the Catalan tree (k >= 1, n >= 0). (End)

A134432 Sum of entries in all the arrangements of the set {1,2,...,n} (to n=0 there corresponds the empty set).

Original entry on oeis.org

0, 1, 9, 66, 490, 3915, 34251, 328804, 3452436, 39456405, 488273005, 6510306726, 93097386174, 1421850988831, 23105078568495, 398118276872520, 7251440043035176, 139227648826275369, 2810658160680434001, 59519819873232720010, 1319356007189991960210
Offset: 0

Views

Author

Emeric Deutsch, Nov 16 2007

Keywords

Comments

Appears to be the binomial transform of A001286 (filled with the appropriate two leading zeros), shifted one index left. - R. J. Mathar, Apr 04 2012

Examples

			a(2)=9 because the arrangements of {1,2} are (empty), 1, 2, 12 and 21.
		

Crossrefs

Programs

  • Magma
    [Binomial(n+1,2)*(&+[Factorial(j)*Binomial(n-1, j-1): j in [0..n]]): n in [0..30]]; // G. C. Greubel, Jan 09 2022
    
  • Maple
    Q[0]:=1: for n to 17 do Q[n]:=sort(simplify(Q[n-1]+t^n*x*(diff(x*Q[n-1], x))), t) end do: for n from 0 to 17 do P[n]:=sort(subs(x=1,Q[n])) end do: seq(subs(t =1,diff(P[n],t)),n=0..17);
    # second Maple program:
    b:= proc(n, t) option remember; `if`(n=0, [t!, 0],
          b(n-1, t)+(p-> p+[0, n*p[1]])(b(n-1, t+1)))
        end:
    a:= n-> b(n, 0)[2]:
    seq(a(n), n=0..23);  # Alois P. Heinz, Feb 19 2020
  • Mathematica
    (* First program *)
    b[n_, s_, t_]:= b[n, s, t] = If[n==0, t! x^s, b[n-1, s, t] + b[n-1, s+n, t+1]];
    T[n_]:= T[n]= Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]] @ b[n, 0, 0];
    a[n_] := Sum[k T[n][[k+1]], {k, 0, n(n+1)/2}];
    a /@ Range[0, 20] (* Jean-François Alcover, Feb 19 2020, after Alois P. Heinz *)
    (* Second program *)
    a[n_]:= ((n+1)/2)*Sum[j*j!*Binomial[n,j], {j,0,n}];
    Table[a[n], {n, 0, 30}] (* G. C. Greubel, Jan 09 2022 *)
  • Sage
    [((n+1)/2)*sum( j*factorial(j)*binomial(n, j) for j in (0..n) ) for n in (0..30)] # G. C. Greubel, Jan 09 2022

Formula

a(n) = Sum_{k=0..n*(n+1)/2} k*A134431(n,k).
a(n) = (d/dt)P[n](t) evaluated at t=1; here P[n](t)=Q[n](t,1) where the polynomials Q[n](t,x) are defined by Q[0]=1 and Q[n]=Q[n-1] + xt^n (d/dx)xQ[n-1]. (Q[n](t,x) is the bivariate generating polynomial of the arrangements of {1,2,...,n}, where t (x) marks the sum (number) of the entries; for example, Q[2](t,x) = 1 + tx + t^2*x + 2t^3*x^2, corresponding to: empty, 1, 2, 12 and 21, respectively.)
E.g.f.: exp(x)*x*(2 + x - x^2) / (2*(1 - x)^3). - Ilya Gutkovskiy, Jun 02 2020
From G. C. Greubel, Jan 09 2022: (Start)
a(n) = A271705(n+1, 2).
a(n) = ((n+1)/2) * Sum_{j=0..n} j * j! * binomial(n, j).
a(n) = (1/n!)*binomial(n+1, 2) * Sum_{j=0..n} (j!)^2 * A271703(n, j). (End)
D-finite with recurrence (-n+1)*a(n) +(n+1)^2*a(n-1) -n*(n+1)*a(n-2)=0. - R. J. Mathar, Jul 26 2022

Extensions

More terms from Alois P. Heinz, Dec 22 2017

A324224 Total number T(n,k) of 1's in falling diagonals with index k in all n X n permutation matrices divided by |k|!; triangle T(n,k), n>=1, 1-n<=k<=n-1, read by rows.

Original entry on oeis.org

1, 1, 2, 1, 1, 4, 6, 4, 1, 1, 6, 18, 24, 18, 6, 1, 1, 8, 36, 96, 120, 96, 36, 8, 1, 1, 10, 60, 240, 600, 720, 600, 240, 60, 10, 1, 1, 12, 90, 480, 1800, 4320, 5040, 4320, 1800, 480, 90, 12, 1, 1, 14, 126, 840, 4200, 15120, 35280, 40320, 35280, 15120, 4200, 840, 126, 14, 1
Offset: 1

Views

Author

Alois P. Heinz, Feb 18 2019

Keywords

Examples

			Triangle T(n,k) begins:
  :                                 1                              ;
  :                           1,    2,    1                        ;
  :                     1,    4,    6,    4,    1                  ;
  :               1,    6,   18,   24,   18,    6,   1             ;
  :          1,   8,   36,   96,  120,   96,   36,   8,  1         ;
  :      1, 10,  60,  240,  600,  720,  600,  240,  60, 10,  1     ;
  :  1, 12, 90, 480, 1800, 4320, 5040, 4320, 1800, 480, 90, 12, 1  ;
		

Crossrefs

Columns k=0-6 give (offsets may differ): A000142, A001563, A001286, A005990, A061206, A062199, A062148.
Row sums give A306495(n-1).
Cf. A132159 (right part of triangle), A306234, A324225.

Programs

  • Maple
    b:= proc(s, c) option remember; (n-> `if`(n=0, c,
          add(b(s minus {i}, c+x^(n-i)), i=s)))(nops(s))
        end:
    T:= n-> (p-> seq(coeff(p, x, i)/abs(i)!, i=1-n..n-1))(b({$1..n}, 0)):
    seq(T(n), n=1..8);
    # second Maple program:
    egf:= k-> (t-> x^t/t!*hypergeom([2, t], [t+1], x))(abs(k)+1):
    T:= (n, k)-> n! * coeff(series(egf(k), x, n+1), x, n):
    seq(seq(T(n, k), k=1-n..n-1), n=1..8);
    # third Maple program:
    T:= (n, k)-> (t-> `if`(t
    				
  • Mathematica
    T[n_, k_] := With[{t = Abs[k]}, If[tJean-François Alcover, Mar 25 2021, after 3rd Maple program *)

Formula

T(n,k) = T(n,-k).
T(n,k) = (n-t)*(n-1)!/t! if t < n with t = |k|, T(n,k) = 0 otherwise.
T(n,k) = 1/|k|! * A324225(n,k).
E.g.f. of column k: x^t/t! * hypergeom([2, t], [t+1], x) with t = |k|+1.
Sum_{k=1-n..n-1} T(n,k) = A306495(n-1).

A129841 Antidiagonal sums of triangle T defined in A048594: T(j,k) = k! * Stirling1(j,k), 1<= k <= j.

Original entry on oeis.org

1, -1, 4, -12, 52, -256, 1502, -10158, 78360, -680280, 6574872, -70075416, 816909816, -10342968456, 141357740736, -2074340369088, 32530886655168, -542971977209760, 9610316495698416, -179788450082431536, 3544714566466060032
Offset: 1

Views

Author

Paul Curtz, May 22 2007

Keywords

Examples

			First seven rows of T are
[    1 ]
[   -1,      2 ]
[    2,     -6,      6 ]
[   -6,     22,    -36,     24 ]
[   24,   -100,    210,   -240,    120 ]
[ -120,    548,  -1350,   2040,  -1800,    720 ]
[  720,  -3528,   9744, -17640,  21000, -15120,   5040 ]
		

References

  • P. Curtz, Integration numerique des systemes differentiels a conditions initiales. Note no. 12 du Centre de Calcul Scientifique de l'Armement, 1969, 135 pages, p. 61. Available from Centre d'Electronique de L'Armement, 35170 Bruz, France, or INRIA, Projets Algorithmes, 78150 Rocquencourt.
  • P. Curtz, Gazette des Mathematiciens, 1992, no. 52, p. 44.
  • P. Flajolet, X. Gourdon and B. Salvy, Gazette des Mathematiciens, 1993, no. 55, pp. 67-78.

Crossrefs

Cf. A048594 (T read by rows), A075181 (T unsigned with rows read backwards), A006252 (row sums of T), A000142 (main diagonal of T), A001286 (unsigned first subdiagonal of T). Unsigned values of second through sixth column of T are in A052517, A052748, A052753, A052767, A052779 resp.

Programs

  • Magma
    m:=21; T:=[ [ Factorial(k)*StirlingFirst(j, k): k in [1..j] ]: j in [1..m] ]; [ &+[ T[j-k+1][k]: k in [1..(j+1) div 2] ]: j in [1..m] ]; // Klaus Brockhaus, Jun 03 2007
  • Mathematica
    m = 21; t[j_, k_] := k!*StirlingS1[j, k]; Total /@ Table[ t[j-k+1, k], {j, 1, m}, {k, 1, Quotient[j+1, 2]}] (* Jean-François Alcover, Aug 13 2012, translated from Klaus Brockhaus's Magma program *)

Formula

E.g.f. for k-th column (k>=1): log(1+x)^k. For further formulas see the references.

Extensions

Edited and extended by Klaus Brockhaus, Jun 03 2007
Previous Showing 31-40 of 71 results. Next