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 21-30 of 71 results. Next

A225479 Triangle read by rows, the ordered Stirling cycle numbers, T(n, k) = k!* s(n, k); n >= 0 k >= 0.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 2, 6, 6, 0, 6, 22, 36, 24, 0, 24, 100, 210, 240, 120, 0, 120, 548, 1350, 2040, 1800, 720, 0, 720, 3528, 9744, 17640, 21000, 15120, 5040, 0, 5040, 26136, 78792, 162456, 235200, 231840, 141120, 40320, 0, 40320, 219168, 708744, 1614816
Offset: 0

Views

Author

Peter Luschny, May 20 2013

Keywords

Comments

The Digital Library of Mathematical Functions defines the Stirling cycle numbers as (-1)^(n-k) times the Stirling numbers of the first kind.

Examples

			[n\k][0,   1,   2,    3,    4,    5,   6]
[0]   1,
[1]   0,   1,
[2]   0,   1,   2,
[3]   0,   2,   6,    6,
[4]   0,   6,  22,   36,   24,
[5]   0,  24, 100,  210,  240,  120,
[6]   0, 120, 548, 1350, 2040, 1800, 720.
...
T(4,2) = 22: The table below shows the compositions of 4 into two parts.
n = 4    Composition       Weight     4!*Weight
            3 + 1            1/3         8
            1 + 3            1/3         8
            2 + 2          1/2*1/2       6
                                        = =
                                  total 22
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, table 245.

Crossrefs

Cf. A048594 (signed version without the first column), A132393.

Programs

  • Maple
    A225479 := proc(n, k) option remember;
    if k > n or  k < 0 then return(0) fi;
    if n = 0 and k = 0 then return(1) fi;
    k*A225479(n-1, k-1) + (n-1)*A225479(n-1, k) end;
    for n from 0 to 9 do seq(A225479(n, k), k = 0..n) od;
  • Mathematica
    t[n_, k_] := k!*StirlingS1[n, k] // Abs; Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 02 2013 *)
  • PARI
    T(n,k)={k!*abs(stirling(n,k,1))} \\ Andrew Howroyd, Jul 27 2020
  • Sage
    def A225479(n, k): return factorial(k)*stirling_number1(n, k)
    for n in (0..6): [A225479(n,k) for k in (0..n)]
    

Formula

For a recursion see the Maple program.
T(n, 0) = A000007; T(n, 1) = A000142; T(n, 2) = A052517.
T(n, 3) = A052748; T(n, n) = A000142; T(n, n-1) = A001286.
row sums = A007840; alternating row sums = A006252.
From Peter Bala, Sep 20 2013: (Start)
E.g.f.: 1/(1 + x*log(1 - t)) = 1 + x*t + (x + 2*x^2)*t^2/2! + (2*x + 6*x^2 + 6*x^3)*t^3/3! + ....
T(n,k) = n!*( the sum of the total weight of the compositions of n into k parts where each part i has weight 1/i ) (see Eger, Theorem 1). An example is given below. (End)
T(n,k) = A132393(n,k) * A000142(k). - Philippe Deléham, Jun 24 2015

A278677 a(n) = Sum_{k=0..n} A011971(n, k)*(k + 1). The Aitken-Bell triangle considered as a linear transform applied to the positive numbers.

Original entry on oeis.org

1, 5, 23, 109, 544, 2876, 16113, 95495, 597155, 3929243, 27132324, 196122796, 1480531285, 11647194573, 95297546695, 809490850313, 7126717111964, 64930685865768, 611337506786061, 5940420217001199, 59502456129204083, 613689271227219015, 6510381400140132872
Offset: 0

Views

Author

Sergey Kirgizov, Nov 26 2016

Keywords

Comments

Original name: Popularity of left children in treeshelves avoiding pattern T231 (with offset 2).
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 T231 illustrated below corresponds to a treeshelf constructed from permutation 231. Popularity is the sum of a certain statistic (number of left children, in this case) over all objects of size n.
a(n) is also the sum of the last entries in all blocks of all set partitions of [n-1]. a(4) = 23 because the sum of the last entries in all blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 3+5+5+4+6 = 23. - Alois P. Heinz, Apr 24 2017
a(n-2) is the number of lines that rhyme (with at least one earlier line) across all rhyme schemes counted by A000110. - Martin Fuller, Apr 20 2025

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, [1, 0],
         (p-> p+[0, p[1]*n])(b(n-1, m+1))+m*b(n-1, m))
        end:
    a:= n-> b(n+1, 0)[2]:
    seq(a(n), n=0..22);  # Alois P. Heinz, Dec 15 2023
    # Using the generating function:
    gf := ((exp(z + exp(z)-1)*(z-1)) + exp(exp(z)-1))/z^2: ser := series(gf, z, 25):
    seq((n+2)!*coeff(ser, z, n), n=0..22);  # Peter Luschny, Feb 01 2025
  • Mathematica
    a[n_] := (n+3) BellB[n+2] - BellB[n+3];
    Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Dec 01 2018 *)
  • Python
    from sympy import bell
    HOW_MANY = 30
    print([(n + 3) * bell(n+2) - bell(n + 3) for n in range(HOW_MANY)])

Formula

E.g.f.: ((exp(z + exp(z)-1)*(z-1)) + exp(exp(z)-1))/z^2.
a(n) = (n + 3)*b(n + 2) - b(n + 3) where b(n) is the n-th Bell number (see A000110).
Asymptotics: a(n) ~ n*b(n).
a(n) = Sum_{k=1..n+1} A285595(n+1,k)/k. - Alois P. Heinz, Apr 24 2017
a(n) = Sum_{k=0..n} Stirling2(n+2, k+1) * (n+1-k). - Ilya Gutkovskiy, Apr 06 2021
a(n) ~ n*Bell(n)*(1 - 1/LambertW(n)). - Vaclav Kotesovec, Jul 28 2021
a(n) = Sum_{k=n+1..(n+1)*(n+2)/2} k * A367955(n+1,k). - Alois P. Heinz, Dec 11 2023

Extensions

New name and offset 0 by Peter Luschny, Feb 01 2025

A000274 Number of permutations of length n with 2 consecutive ascending pairs.

Original entry on oeis.org

0, 0, 1, 3, 18, 110, 795, 6489, 59332, 600732, 6674805, 80765135, 1057289046, 14890154058, 224497707343, 3607998868005, 61576514013960, 1112225784377144, 21197714949305577, 425131949816628507, 8950146311929021210, 197350726178034917670, 4548464355722328578691
Offset: 1

Views

Author

Keywords

Comments

From Emeric Deutsch, May 25 2009: (Start)
a(n) = number of excedances in all derangements of [n-1]. Example: a(5)=18 because the derangements of {1,2,3,4} are 4*123, 3*14*2, 3*4*12, 4*3*12, 2*14*3, 2*4*13, 2*3*4*1, 3*4*21, 4*3*21 with the 18 excedances marked. An excedance of a permutation p is a position i such that p(i)>i.
a(n) = Sum(k*A046739(n,k), k>=1).
(End)
Appears to be the inverse binomial transform of A001286 (filling the two leading zeros in there), then shifting one place to the right. - R. J. Mathar, Apr 04 2012

References

  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 210 (divided by 2).
  • 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

A diagonal in triangle A010027.
Cf. A046739. [Emeric Deutsch, May 25 2009]

Programs

  • Maple
    a:= n->sum((n-1)!*sum((-1)^k/k!/2, j=1..n-1), k=0..n-1): seq(a(n), n=1..23); # Zerinvary Lajos, May 17 2007
  • Mathematica
    Table[Subfactorial[n]*n/2, {n, 2, 20}] (* Zerinvary Lajos, Jul 09 2009 *)

Formula

a(n) = (1 + n) a(n - 1) + (3 + n) a(n - 2) + (3 - n) a(n - 3) + (2 - n) a(n - 4).
E.g.f.: x^2/2*exp(-x)/(1-x)^2. - Vladeta Jovovic, Jan 03 2003
a(n) = (n-1)^2/(n-2)*a(n-1)-(-1)^n*(n-1)/2, n>2, a(2)=0. - Vladeta Jovovic, Aug 31 2003
a(n) = (1/2){[n!/e] - [(n-1)!/e]} (conjectured).
a(n) = (n-1)*GAMMA(n,-1)*exp(-1)/2 where GAMMA = incomplete Gamma function. [Mark van Hoeij, Nov 11 2009]
a(n) = A145887(n-1) + A145886(n-1). - Anton Zakharov, Aug 28 2016

Extensions

Name clarified and offset changed by N. J. A. Sloane, Apr 12 2014

A075181 Coefficients of certain polynomials (rising powers).

Original entry on oeis.org

1, 2, 1, 6, 6, 2, 24, 36, 22, 6, 120, 240, 210, 100, 24, 720, 1800, 2040, 1350, 548, 120, 5040, 15120, 21000, 17640, 9744, 3528, 720, 40320, 141120, 231840, 235200, 162456, 78792, 26136, 5040, 362880, 1451520, 2751840, 3265920, 2693880, 1614816
Offset: 1

Views

Author

Wolfdieter Lang, Sep 19 2002

Keywords

Comments

This is the unsigned triangle A048594 with rows read backwards.
The row polynomials p(n,y) := Sum_{m=0..n-1}a(n,m)*y^m, n>=1, are obtained from (log(x)*(-x*log(x))^n)*(d^n/dx^n)(1/log(x)), n>=1, after replacement of log(x) by y.
The gcd of row n is A075182(n). Row sums give A007840(n), n>=1.
The columns give A000142 (factorials), A001286 (Lah), 2* A075183, 2*A075184, 4*A075185, 4!*A075186, 4!*A075187 for m=0..6.
Coefficients T(n,k) of the differential operator expansion
[x^(1+y)D]^n = x^(n*y)[T(n,1)* (xD)^n / n! + y * T(n,2)* (xD)^(n-1) / (n-1)! + ... + y^(n-1) * T(n,n) * (xD)], where D = d/dx. Note that (xD)^n = Bell(n,:xD:), where (:xD:)^n = x^n * D^n and Bell(n,x) are the Bell / Touchard polynomials. See A094638. - Tom Copeland, Aug 22 2015

Examples

			Triangle starts:
1;
2,1;
6,6,2;
24,36,22,6;
...
n=2: (x^2*log(x)^3)*(d^2/d^x^2)(1/log(x)) = 2 + log(x).
		

Crossrefs

Programs

  • Maple
    seq(seq(k!*abs(Stirling1(n,k)),k=n..1,-1),n=1..10); # Robert Israel, Jul 12 2015
  • Mathematica
    Table[ Table[ k!*StirlingS1[n, k] // Abs, {k, 1, n}] // Reverse, {n, 1, 9}] // Flatten (* Jean-François Alcover, Jun 21 2013 *)
  • PARI
    {T(n, k)= if(k<0 || k>=n, 0, (-1)^k* stirling(n, n-k)* (n-k)!)} /* Michael Somos Apr 11 2007 */

Formula

a(n, m) = (n-m)!*|S1(n, n-m)|, n>=m+1>=1, else 0, with S1(n, m) := A008275(n, m) (Stirling1).
a(n, m) = (n-m)*a(n-1, m)+(n-1)*a(n-1, m-1), if n>=m+1>=1, a(n, -1) := 0 and a(1, 0)=1, else 0.

A180119 a(n) = (n+2)! * Sum_{k = 1..n} 1/((k+1)*(k+2)).

Original entry on oeis.org

0, 1, 6, 36, 240, 1800, 15120, 141120, 1451520, 16329600, 199584000, 2634508800, 37362124800, 566658892800, 9153720576000, 156920924160000, 2845499424768000, 54420176498688000, 1094805903679488000, 23112569077678080000, 510909421717094400000, 11802007641664880640000
Offset: 0

Views

Author

Gary Detlefs, Aug 10 2010

Keywords

Comments

In general, a sequence of the form (n+x+2)! * Sum_{k = 1..n} (k+x)!/(k+x+2)! will have a closed form of (n+x+2)!*n/((x+2)*(n+2+x)).
0 followed by A001286. - R. J. Mathar, Aug 13 2010
Sum of the entries in all cycles of all permutations of [n]. - Alois P. Heinz, Apr 19 2017

Crossrefs

Programs

  • Magma
    [n*Factorial(n+2)/(2*(n+2)): n in [0..25]]; // Vincenzo Librandi, Feb 20 2017
  • Maple
    a:= n-> n*(n+2)!/(2*(n+2)): seq(a(n), n=0..20);
  • Mathematica
    Table[n (n + 2)! / (2 (n + 2)), {n, 0, 30}] (* Vincenzo Librandi, Feb 20 2017 *)
  • PARI
    a(n) = (n+2)! * sum(k=1, n,1/((k+1)*(k+2))); \\ Michel Marcus, Jan 10 2015
    
  • PARI
    apply( A180119(n)=(n+1)!\2*n, [0..20]) \\ M. F. Hasler, Apr 10 2018
    

Formula

a(n) = n*(n+1)!/2. [Simplified by M. F. Hasler, Apr 10 2018]
a(n) = (n+1)! * Sum_{k = 2..n} (1/(k^2+k)), with offset 1. - Gary Detlefs, Sep 15 2011
a(n) = Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*k^(n+1) = (1/(2*x + 1))*Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*(x*n + k)^(n+1), for arbitrary x != -1/2. - Peter Bala, Feb 19 2017
From Alois P. Heinz, Apr 19 2017: (Start)
a(n) = A000142(n) * A000217(n) = Sum_{k=1..n} A285439(n,k).
E.g.f.: x/(1-x)^3. (End)
a(n) = A001286(n+1) for n > 0. - M. F. Hasler, Apr 10 2018

A253283 Triangle read by rows: coefficients of the partial fraction decomposition of [d^n/dx^n] (x/(1-x))^n/n!.

Original entry on oeis.org

1, 0, 1, 0, 2, 3, 0, 3, 12, 10, 0, 4, 30, 60, 35, 0, 5, 60, 210, 280, 126, 0, 6, 105, 560, 1260, 1260, 462, 0, 7, 168, 1260, 4200, 6930, 5544, 1716, 0, 8, 252, 2520, 11550, 27720, 36036, 24024, 6435, 0, 9, 360, 4620, 27720, 90090, 168168, 180180, 102960, 24310
Offset: 0

Views

Author

Peter Luschny, Mar 20 2015

Keywords

Comments

The rows give (up to sign) the coefficients in the expansion of the integer-valued polynomial (x+1)^2*(x+2)^2*(x+3)^2*...*(x+n)^2*(x+n+1) / (n!*(n+1)!) in the basis made of the binomial(x+i,i). - F. Chapoton, Oct 31 2022
This is related to the cluster fans of type B (see Fomin and Zelevinsky reference) - F. Chapoton, Nov 17 2022.

Examples

			[1]
[0, 1]
[0, 2,   3]
[0, 3,  12,   10]
[0, 4,  30,   60,   35]
[0, 5,  60,  210,  280,  126]
[0, 6, 105,  560, 1260, 1260,  462]
[0, 7, 168, 1260, 4200, 6930, 5544, 1716]
.
R_0(x) = 1/(x-1)^0.
R_1(x) = 0/(x-1)^1 + 1/(x-1)^2.
R_2(x) = 0/(x-1)^2 + 2/(x-1)^3 + 3/(x-1)^4.
R_3(x) = 0/(x-1)^3 + 3/(x-1)^4 + 12/(x-1)^5 + 10/(x-1)^6.
Then k!*[x^k] R_n(x) is A001286(k+2) and A001754(k+3) for n = 2, 3 respectively.
.
Seen as an array A(n, k) = binomial(n + k, k)*binomial(n + 2*k - 1, n + k):
[0] 1, 1,   3,   10,    35,    126,     462, ...
[1] 0, 2,  12,   60,   280,   1260,    5544, ...
[2] 0, 3,  30,  210,  1260,   6930,   36036, ...
[3] 0, 4,  60,  560,  4200,  27720,  168168, ...
[4] 0, 5, 105, 1260, 11550,  90090,  630630, ...
[5] 0, 6, 168, 2520, 27720, 252252, 2018016, ...
[6] 0, 7, 252, 4620, 60060, 630630, 5717712, ...
		

Crossrefs

T(n, n) = C(2*n-1, n) = A001700(n-1).
T(n, n-1) = A005430(n-1) for n >= 1.
T(n, n-2) = A051133(n-2) for n >= 2.
T(n, 2) = A027480(n-1) for n >= 2.
T(2*n, n) = A208881(n) for n >= 0.
A002002 (row sums).

Programs

  • Maple
    T_row := proc(n) local egf, k, F, t;
    if n=0 then RETURN(1) fi;
    egf := (x/(1-x))^n/n!; t := diff(egf,[x$n]);
    F := convert(t,parfrac,x);
    # print(seq(k!*coeff(series(F,x,20),x,k),k=0..7));
    # gives A000142, A001286, A001754, A001755, A001777, ...
    seq(coeff(F,(x-1)^(-k)),k=n..2*n) end:
    seq(print(T_row(n)),n=0..7);
    # 2nd version by R. J. Mathar, Dec 18 2016:
    A253283 := proc(n,k)
        binomial(n,k)*binomial(n+k-1,k-1) ;
    end proc:
  • Mathematica
    Table[Binomial[n, k] Binomial[n + k - 1, k - 1], {n, 0, 9}, {k, 0, n}] // Flatten (* Michael De Vlieger, Feb 22 2017 *)
  • PARI
    T(n,k) = binomial(n,k)*binomial(n+k-1,k-1);
    tabl(nn) = for(n=0, nn, for (k=0, n, print1(T(n,k), ", ")); print); \\ Michel Marcus, Apr 29 2018

Formula

The exponential generating functions for the rows of the square array L(n,k) = ((n+k)!/n!)*C(n+k-1,n-1) (associated to the unsigned Lah numbers) are given by R_n(x) = Sum_{k=0..n} T(n,k)/(x-1)^(n+k).
T(n,k) = C(n,k)*C(n+k-1,k-1).
Sum_{k=0..n} T(n,k) = (-1)^n*hypergeom([-n,n],[1],2) = (-1)^n*A182626(n).
Row generating function: Sum_{k>=1} T(n,k)*z^k = z*n* 2F1(1-n,n+1 ; 2; -z). - R. J. Mathar, Dec 18 2016
From Peter Bala, Feb 22 2017: (Start)
G.f.: (1/2)*( 1 + (1 - t)/sqrt(1 - 2*(2*x + 1)*t + t^2) ) = 1 + x*t + (2*x + 3*x^2)*t^2 + (3*x + 12*x^2 + 10*x^3)*t^3 + ....
n-th row polynomial R(n,x) = (1/2)*(LegendreP(n, 2*x + 1) - LegendreP(n-1, 2*x + 1)) for n >= 1.
The row polynomials are the black diamond product of the polynomials x^n and x^(n+1) (see Dukes and White 2016 for the definition of this product).
exp(Sum_{n >= 1} R(n,x)*t^n/n) = 1 + x*t + x*(1 + 2*x)*t^2 + x*(1 + 5*x + 5*x^2)*t^3 + ... is a g.f. for A033282, but with a different offset.
The polynomials P(n,x) := (-1)^n/n!*x^(2*n)*(d/dx)^n(1 + 1/x)^n begin 1, 3 + 2*x , 10 + 12*x + 3*x^2, ... and are the row polynomials for the row reverse of this triangle. (End)
Let Q(n, x) = Sum_{j=0..n} (-1)^(n - j)*A269944(n, j)*x^(2*j - 1) and P(x, y) = (LegendreP(x, 2*y + 1) - LegendreP(x-1, 2*y + 1)) / 2 (see Peter Bala above). Then n!*(n - 1)!*[y^n] P(x, y) = Q(n, x) for n >= 1. - Peter Luschny, Oct 31 2022
From Peter Bala, Apr 18 2024: (Start)
G.f.: Sum_{n >= 0} binomial(2*n-1, n)*(x*t)^n/(1 - t)^(2*n) = 1 + x*t + (2*x + 3*x^2)*t^2 + (3*x + 12*x^2 + 10*x^3)*t^3 + ....
n-th row polynomial R(n, x) = [t^n] ( (1 - t)/(1 - (1 + x)*t) )^n.
It follows that for integer x, the sequence {R(n, x) : n >= 0} satisfies the Gauss congruences: R(n*p^r, x) == R(n*p^(r-1), x) (mod p^r) for all primes p and positive integers n and r.
R(n, -2) = (-1)^n * A002003(n) for n >= 1.
R(n, 3) = A299507(n). (End)

A037960 a(n) = n*(3*n+1)*(n+2)!/24.

Original entry on oeis.org

0, 1, 14, 150, 1560, 16800, 191520, 2328480, 30240000, 419126400, 6187104000, 97037740800, 1612798387200, 28332944640000, 524813313024000, 10226013557760000, 209144207720448000, 4480594531725312000, 100357207837286400000, 2345925761384325120000, 57136703662028390400000
Offset: 0

Views

Author

Keywords

Comments

For n>=1, a(n) is equal to the number of surjections from {1,2,..,n+2} onto {1,2,...,n}. - Aleksandar M. Janjic and Milan Janjic, Feb 24 2007

References

  • Identity (1.18) in H. W. Gould, Combinatorial Identities, Morgantown, 1972; page 3.

Crossrefs

Programs

Formula

a(n) = Sum_{j=0..n} (-1)^(n-j)*binomial(n,j)*j^(n+2). - Vladimir Kruchinin, Jun 01 2013
(3*n-2)*(n-1)*a(n) - n*(n+2)*(3*n+1)*a(n-1) = 0. - R. J. Mathar, Jul 26 2015
E.g.f.: x*(1 + 2*x)/(1 - x)^5. - Ilya Gutkovskiy, Feb 20 2017
From G. C. Greubel, Jun 20 2022: (Start)
a(n) = n!*StirlingS2(n+2, n).
a(n) = A131689(n+2, n).
a(n) = A019538(n+2, n). (End)

Extensions

More terms from Vincenzo Librandi, Feb 20 2017

A335344 Expansion of e.g.f. exp(x^2/(2*(1 - x)^2)).

Original entry on oeis.org

1, 0, 1, 6, 39, 300, 2715, 28350, 335265, 4422600, 64298745, 1020477150, 17542820295, 324552648420, 6426708843555, 135573281994150, 3034400481137025, 71801374285040400, 1790523094644709425, 46923435009924823350, 1289032229351717425575
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 02 2020

Keywords

Comments

For n>0, a(n) is also the number of ways to split n people into nonempty groups, have each group sit around a circular table, and select 2 people from each table (where two seating arrangements are considered identical if each person has the same left neighbors in both of them). See example below. - Enrique Navarrete, Oct 01 2023

Examples

			For n = 5, using one table, there are 4! circular seatings and binomial(5,2) ways to select 2 persons, hence 240 ways. Using two tables, the only way we can select 2 persons from each one is seating 3 persons in one table and 2 in the other, which can be done in 20 ways; then choosing 2 persons from each table can be done in 3 ways, hence giving another 60 ways for a total of 300. - _Enrique Navarrete_, Oct 01 2023
		

Crossrefs

Programs

  • Maple
    f:= gfun:-rectoproc({a(n) = -(n-1)*(3*n-7)*a(n-2) + 3*(n-1)*a(n-1) + (n - 1)*(n - 2)*(n - 3)*a(n-3),a(0)=1,a(1)=0,a(2)=1},a(n),remember):
    map(f, [$0..30]); # Robert Israel, Jun 04 2020
  • Mathematica
    nmax = 20; CoefficientList[Series[Exp[x^2/(2 (1 - x)^2)], {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = 1; a[n_] := a[n] = (1/2) Sum[Binomial[n - 1, k - 1] (k - 1) k! a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 20}]
  • PARI
    seq(n)=Vec(serlaplace(exp(x^2/(2*(1 - x)^2) + O(x*x^n)))) \\ Andrew Howroyd, Jun 02 2020

Formula

a(0) = 1; a(n) = Sum_{k=1..n} binomial(n-1,k-1) * A001286(k) * a(n-k).
D-finite with recurrence a(n) = -(n - 1)*(3*n - 7)*a(n - 2) + 3*(n - 1)*a(n - 1) + (n - 1)*(n - 2)*(n - 3)*a(n - 3). - Robert Israel, Jun 04 2020
a(n) ~ n^(n - 1/6) * exp(1/6 - n^(1/3)/2 + 3*n^(2/3)/2 - n) / sqrt(3). - Vaclav Kotesovec, Jun 11 2020
a(n) = n! * Sum_{k=0..floor(n/2)} binomial(n-1,n-2*k)/(2^k * k!). - Seiichi Manyama, Mar 16 2023

A295027 T(n,k) is (1/n) times the n-th derivative of the difference between the k-th tetration of x (power tower of order k) and its predecessor at x=1; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 2, 6, 6, 0, 2, 34, 36, 24, 0, 9, 150, 330, 240, 120, 0, -6, 938, 2790, 3120, 1800, 720, 0, 118, 5509, 28014, 38220, 31080, 15120, 5040, 0, -568, 40584, 294504, 535416, 504000, 332640, 141120, 40320, 0, 4716, 297648, 3459324, 7877520, 8968680, 6804000, 3840480, 1451520, 362880
Offset: 1

Views

Author

Alois P. Heinz, Nov 12 2017

Keywords

Comments

T(n,k) is defined for all n,k >= 1. The triangle contains only the terms with k<=n. T(n,k) = 0 for k>n.

Examples

			Triangle T(n,k) begins:
  1;
  0,    1;
  0,    1,     2;
  0,    2,     6,      6;
  0,    2,    34,     36,     24;
  0,    9,   150,    330,    240,    120;
  0,   -6,   938,   2790,   3120,   1800,    720;
  0,  118,  5509,  28014,  38220,  31080,  15120,   5040;
  0, -568, 40584, 294504, 535416, 504000, 332640, 141120, 40320;
  ...
		

Crossrefs

Column k=2 gives A005168 for n>1.
Row sums give A136461(n-1).
Main diagonal gives A104150 (for n>0).

Programs

  • Maple
    f:= proc(n) option remember; `if`(n<0, 0,
          `if`(n=0, 1, (x+1)^f(n-1)))
        end:
    T:= (n, k)-> (n-1)!*coeff(series(f(k)-f(k-1), x, n+1), x, n):
    seq(seq(T(n, k), k=1..n), n=1..12);
    # second Maple program:
    b:= proc(n, k) option remember; `if`(n=0, 1, `if`(k=0, 0,
          -add(binomial(n-1, j)*b(j, k)*add(binomial(n-j, i)*
          (-1)^i*b(n-j-i, k-1)*(i-1)!, i=1..n-j), j=0..n-1)))
        end:
    T:= (n, k)-> (b(n, min(k, n))-`if`(k=0, 0, b(n, min(k-1, n))))/n:
    seq(seq(T(n, k), k=1..n), n=1..12);
  • Mathematica
    f[n_] := f[n] = If[n < 0, 0, If[n == 0, 1, (x + 1)^f[n - 1]]];
    T[n_, k_] := (n - 1)!*SeriesCoefficient[f[k] - f[k - 1], {x, 0, n}];
    Table[T[n, k], {n, 1, 12}, {k, 1, n}] // Flatten
    (* second program: *)
    b[n_, k_] := b[n, k] = If[n == 0, 1, If[k == 0, 0, -Sum[Binomial[n - 1, j]*b[j, k]*Sum[Binomial[n - j, i]*(-1)^i*b[n - j - i, k - 1]*(i - 1)!, {i, 1, n - j}], {j, 0, n - 1}]]];
    T[n_, k_] := (b[n, Min[k, n]] - If[k == 0, 0, b[n, Min[k - 1, n]]])/n;
    Table[T[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, May 28 2018, from Maple *)

Formula

T(n,k) = (n-1)! * [x^n] ((x+1)^^k - (x+1)^^(k-1)).
T(n,k) = 1/n * [(d/dx)^n (x^^k - x^^(k-1))]_{x=1}.
T(n,k) = A295028(n,k) - A295028(n,k-1).
T(n,k) = 1/n * A277536(n,k).
T(n+1,n) = A001286(n).

A037961 a(n) = n^2*(n+1)*(n+3)!/48.

Original entry on oeis.org

0, 1, 30, 540, 8400, 126000, 1905120, 29635200, 479001600, 8083152000, 142702560000, 2637143308800, 50999300352000, 1031319184896000, 21785854970880000, 480178027929600000, 11029155770400768000
Offset: 0

Views

Author

Keywords

Comments

For n>=1, a(n) is equal to the number of surjections from {1,2,...,n+3} onto {1,2,...,n}. - Aleksandar M. Janjic and Milan Janjic, Feb 24 2007

References

  • Identity (1.19) in H. W. Gould, Combinatorial Identities, Morgantown, 1972; page 3.

Crossrefs

Programs

  • Magma
    [Factorial(n+3)*n^2*(n+1)/48: n in [0..20]]; // Vincenzo Librandi, Nov 18 2011
    
  • Mathematica
    Table[n!*StirlingS2[n+3, n], {n,0,30}] (* G. C. Greubel, Jun 20 2022 *)
  • PARI
    a(n)=(n+3)!*n^2*(n+1)/48 \\ Charles R Greathouse IV, Nov 02 2011
    
  • SageMath
    [factorial(n)*stirling_number2(n+3, n) for n in (0..30)] # G. C. Greubel, Jun 20 2022

Formula

(n-1)^2*a(n) - n*(n+3)*(n+1)*a(n-1) = 0. - R. J. Mathar, Jul 26 2015
E.g.f.: x*(1 + 8*x + 6*x^2)/(1 - x)^7. - Ilya Gutkovskiy, Feb 20 2017
a(n) = Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*k^(n+3). - Peter Bala, Mar 28 2017
From G. C. Greubel, Jun 20 2022: (Start)
a(n) = n!*StirlingS2(n+3, n).
a(n) = A131689(n+3, n).
a(n) = A019538(n+3, n). (End)
Previous Showing 21-30 of 71 results. Next