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-10 of 86 results. Next

A127741 a(n) = (n+1) * A005493(n).

Original entry on oeis.org

1, 6, 30, 148, 755, 4044, 22841, 136056, 853452, 5625950, 38885297, 281170080, 2122313505, 16688829122, 136457754030, 1158155642512, 10186602918035, 92711977180164, 871936904575985, 8462913158427580, 84668764368102012, 872196382566014506, 9241557859113581689
Offset: 0

Views

Author

Gary W. Adamson, Jan 27 2007

Keywords

Examples

			a(n) = sum of terms in n-th row of A127740. a(2) = 30 = (6 + 9 + 15).
		

Crossrefs

Cf. A005493, A052889, A011971, A127740 (row sums).

Programs

  • Mathematica
    lim=24;A005493=Differences[BellB[Range[lim]]];Array[(#+1)*A005493[[#+1]]&,lim-1,0] (* James C. McMahon, Jan 02 2025 *)
  • Python
    # requires Python 3.2 or higher. Otherwise use def'n of accumulate in Python docs.
    from itertools import accumulate
    A127741_list, blist, b = [], [1], 1
    for n in range(1,1001):
        blist = list(accumulate([b]+blist))
        b = blist[-1]
        A127741_list.append(blist[-2]*n) # Chai Wah Wu, Sep 20 2014

Formula

a(n) = (n+1) * A005493(n).

Extensions

Edited by Jon E. Schoenfield, May 27 2019

A159573 Triangle read by rows, A055248 * (A005493 * 0^(n-k)).

Original entry on oeis.org

1, 2, 1, 4, 3, 3, 8, 7, 12, 10, 16, 15, 33, 50, 37, 32, 31, 78, 160, 222, 151, 64, 63, 171, 420, 814, 1057, 674, 128, 127, 360, 990, 2368, 4379, 5392, 3263, 256, 255, 741, 2190, 6031, 14043, 24938, 29367, 17007, 512, 511, 1506, 4660, 14134, 38656, 87620
Offset: 0

Views

Author

Gary W. Adamson, Apr 16 2009

Keywords

Comments

Row sums = A005493: (1, 3, 10, 37, 151, 674, 3263,...); = row sums of Aitken's array. As a property of eigentriangles, sum of n-th row terms = rightmost term of next row.

Examples

			First few rows of the triangle =
1;
2, 1;
4, 3, 3;
8, 7, 12, 10;
16, 15, 33, 50, 37;
32, 31, 78, 160, 222, 151;
64, 63, 171, 420, 814, 1057, 674;
128, 127, 360, 990, 2368, 4379, 5392, 3263;
256, 255, 741, 2190, 6031, 14043, 24938, 29367, 17007;
512, 511, 1506, 4660, 14134, 38656, 87620, 150098, 170070, 94828;
1024, 1023, 3039, 9680, 31376, 96338, 260164, 574288, 952392, 1043108, 562595;
...
Example: row 3 = (8, 7, 12, 10) = termwise products of (8, 7, 4, 1) and
(1, 1, 3, 10), where (8, 7, 12, 10) = row 3 of triangle A055248.
		

Crossrefs

Formula

Triangle read by rows, A055248 * (A005493 * 0^(n-k)); equivalent to the product of triangle A055248 and its own eigensequence (diagonalized with the rest zeros, as an infinite lower triangular matrix).

A091046 Stirling transform of first differences of Bell numbers (A005493), if offset zero: a(n) = Sum_{k=1..n} A008277(n,k)*A005493(k).

Original entry on oeis.org

1, 4, 20, 119, 817, 6338, 54707, 519184, 5366097, 59934937, 718748131, 9203953921, 125268224954, 1804750726306, 27426230051634, 438260834123607, 7343677070172330, 128716143768613600, 2354633702684629141, 44865189679858465163, 888784065003104357924
Offset: 1

Views

Author

Karol A. Penson, Dec 15 2003

Keywords

Comments

Equals A039810 * [1,2,3,...], i.e., the square of the Stirling2 triangle and the natural number vector. - Gary W. Adamson, Jan 31 2008
From Mark Wildon, Nov 01 2022: (Start)
a(n) is the number of pairs (P, P') where P' is a set partition of {1,...,n}, P is a set partition of {1,...,P} refining P, and one part of P' is distinguished.
For example, for n=2 the 4 set partition pairs for n=2 are ({{1,2}},{{1,2}*}), ({{1},{2}},{{1,2}}*), ({{1},{2}},{{1}*,{2}}), ({{1},{2}},{{1},{2}*}), where the distinguished part of the coarser partition is marked *
a(n) is the inner product in the character ring of the symmetric group S_{mn} of the characters pi^n and phi_n Ind_{S_m wr S_n}^{S_{mn}}, where pi(g) = |Fix g| is the permutation character of the natural representation of S_{mn} and phi_n is the character of the wreath product S_m wr S_n obtained by inflating the character chi^{(n-1,1)} of S_n to S_m wr S_n. (End)

Crossrefs

Programs

  • Maple
    s:= proc(n) option remember; expand(`if`(n=0, 1,
          x*add(s(n-j)*binomial(n-1, j-1), j=1..n)))
        end:
    S:= proc(n, k) option remember; coeff(s(n), x, k) end:
    b:= proc(n, k) option remember; `if`(k=0, n,
          add(S(n, j)*b(j, k-1), j=0..n))
        end:
    a:= n-> b(n, 2):
    seq(a(n), n=1..23);  # Alois P. Heinz, Aug 24 2021
  • Mathematica
    len = 23;
    Array[StirlingS2, {len, len}].Differences[Array[BellB, len+1]] (* Jean-François Alcover, Apr 25 2022 *)

Formula

E.g.f.: (exp(exp(x)-1)-1)*exp(exp(exp(x)-1)-1).
Representation as an infinite sum (Dobinski-type relation): a(n) = exp(exp(-1)-1)*Sum(p^n*((Sum((Stirling2(p+1, k) - Stirling2(p, k))*exp(-k), k=1..p) + exp(-(p+1)))/p!), p>=1), n = 1, 2, ....

A000178 Superfactorials: product of first n factorials.

Original entry on oeis.org

1, 1, 2, 12, 288, 34560, 24883200, 125411328000, 5056584744960000, 1834933472251084800000, 6658606584104736522240000000, 265790267296391946810949632000000000, 127313963299399416749559771247411200000000000, 792786697595796795607377086400871488552960000000000000
Offset: 0

Views

Author

Keywords

Comments

a(n) is also the Vandermonde determinant of the numbers 1,2,...,(n+1), i.e., the determinant of the (n+1) X (n+1) matrix A with A[i,j] = i^j, 1 <= i <= n+1, 0 <= j <= n. - Ahmed Fares (ahmedfares(AT)my-deja.com), May 06 2001
a(n) = (1/n!) * D(n) where D(n) is the determinant of order n in which the (i,j)-th element is i^j. - Amarnath Murthy, Jan 02 2002
Determinant of S_n where S_n is the n X n matrix S_n(i,j) = Sum_{d|i} d^j. - Benoit Cloitre, May 19 2002
Appears to be det(M_n) where M_n is the n X n matrix with m(i,j) = J_j(i) where J_k(n) denote the Jordan function of row k, column n (cf. A059380(m)). - Benoit Cloitre, May 19 2002
a(2n+1) = 1, 12, 34560, 125411328000, ... is the Hankel transform of A000182 (tangent numbers) = 1, 2, 16, 272, 7936, ...; example: det([1, 2, 16, 272; 2, 16, 272, 7936; 16, 272, 7936, 353792; 272, 7936, 353792, 22368256]) = 125411328000. - Philippe Deléham, Mar 07 2004
Determinant of the (n+1) X (n+1) matrix whose i-th row consists of terms 1 to n+1 of the Lucas sequence U(i,Q), for any Q. When Q=0, the Vandermonde matrix is obtained. - T. D. Noe, Aug 21 2004
Determinant of the (n+1) X (n+1) matrix A whose elements are A(i,j) = B(i+j) for 0 <= i,j <= n, where B(k) is the k-th Bell number, A000110(k) [I. Mezo, JIS 14 (2011) # 11.1.1]. - T. D. Noe, Dec 04 2004
The Hankel transform of the sequence A090365 is A000178(n+1); example: det([1,1,3; 1,3,11; 3,11,47]) = 12. - Philippe Deléham, Mar 02 2005
Theorem 1.3, page 2, of Polynomial points, Journal of Integer Sequences, Vol. 10 (2007), Article 07.3.6, provides an example of an Abelian quotient group of order (n-1) superfactorial, for each positive integer n. The quotient is obtained from sequences of polynomial values. - E. F. Cornelius, Jr. (efcornelius(AT)comcast.net), Apr 09 2007
Starting with offset 1 this is a 'Matryoshka doll' sequence with alpha=1, the multiplicative counterpart to the additive A000292. seq(mul(mul(i,i=alpha..k), k=alpha..n),n=alpha..12). - Peter Luschny, Jul 14 2009
For n>0, a(n) is also the determinant of S_n where S_n is the n X n matrix, indexed from 1, S_n(i,j)=sigma_i(j), where sigma_k(n) is the generalized divisor sigma function: A000203 is sigma_1(n). - Enrique Pérez Herrero, Jun 21 2010
a(n) is the multiplicative Wiener index of the (n+1)-vertex path. Example: a(4)=288 because in the path on 5 vertices there are 3 distances equal to 2, 2 distances equal to 3, and 1 distance equal to 4 (2*2*2*3*3*4=288). See p. 115 of the Gutman et al. reference. - Emeric Deutsch, Sep 21 2011
a(n-1) = Product_{j=1..n-1} j! = V(n) = Product_{1 <= i < j <= n} (j - i) (a Vandermondian V(n), see the Ahmed Fares May 06 2001 comment above), n >= 1, is in fact the determinant of any n X n matrix M(n) with entries M(n;i,j) = p(j-1,x = i), 1 <= i, j <= n, where p(m,x), m >= 0, are monic polynomials of exact degree m with p(0,x) = 1. This is a special x[i] = i choice in a general theorem given in Vein-Dale, p. 59 (written for the transposed matrix M(n;j,x_i) = p(i-1,x_j) = P_i(x_j) in Vein-Dale, and there a_{k,k} = 1, for k=1..n). See the Aug 26 2013 comment under A049310, where p(n,x) = S(n,x) (Chebyshev S). - Wolfdieter Lang, Aug 27 2013
a(n) is the number of monotonic magmas on n elements labeled 1..n with a symmetric multiplication table. I.e., Product(i,j) >= max(i,j); Product(i,j) = Product(j,i). - Chad Brewbaker, Nov 03 2013
The product of the pairwise differences of n+1 integers is a multiple of a(n) [and this does not hold for any k > a(n)]. - Charles R Greathouse IV, Aug 15 2014
a(n) is the determinant of the (n+1) X (n+1) matrix M with M(i,j) = (n+j-1)!/(n+j-i)!, 1 <= i <= n+1, 1 <= j <= n+1. - Stoyan Apostolov, Aug 26 2014
All terms are in A064807 and all terms after a(2) are in A005101. - Ivan N. Ianakiev, Sep 02 2016
Empirical: a(n-1) is the determinant of order n in which the (i,j)-th entry is the (j-1)-th derivative of x^(x+i-1) evaluated at x=1. - John M. Campbell, Dec 13 2016
Empirical: If f(x) is a smooth, real-valued function on an open neighborhood of 0 such that f(0)=1, then a(n) is the determinant of order n+1 in which the (i,j)-th entry is the (j-1)-th derivative of f(x)/((1-x)^(i-1)) evaluated at x=0. - John M. Campbell, Dec 27 2016
Also the automorphism group order of the n-triangular honeycomb rook graph. - Eric W. Weisstein, Jul 14 2017
Is the zigzag Hankel transform of A000182. That is, a(2*n+1) is the Hankel transform of A000182 and a(2*n+2) is the Hankel transform of A000182(n+1). - Michael Somos, Mar 11 2020
Except for n = 0, 1, superfactorial a(n) is never a square (proof in link Mabry and Cormick, FFF 4 p. 349); however, when k belongs to A349079 (see for further information), there exists m, 1 <= m <= k such that a(k) / m! is a square. - Bernard Schott, Nov 29 2021

Examples

			a(3) = (1/6)* | 1 1 1 | 2 4 8 | 3 9 27 |
a(7) = n! * a(n-1) = 7! * 24883200 = 125411328000.
a(12) = 1! * 2! * 3! * 4! * 5! * 6! * 7! * 8! * 9! * 10! * 11! * 12!
= 1^12 * 2^11 * 3^10 * 4^9 * 5^8 * 6^7 * 7^6 * 8^5 * 9^4 * 10^3 * 11^2 * 12^1
= 2^56 * 3^26 * 5^11 * 7^6 * 11^2.
G.f. = 1 + x + 2*x^2 + 12*x^3 + 288*x^4 + 34560*x^5 + 24883200*x^6 + ...
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 545.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 135-145.
  • A. Fletcher, J. C. P. Miller, L. Rosenhead and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 50.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 231.
  • H. J. Ryser, Combinatorial Mathematics. Mathematical Association of America, Carus Mathematical Monograph 14, 1963, p. 53.
  • 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. Vein and P. Dale, Determinants and Their Applications in Mathematical Physics, Springer, 1999.

Crossrefs

Programs

  • Magma
    [&*[Factorial(k): k in [0..n]]: n in [0..20]]; // Bruno Berselli, Mar 11 2015
    
  • Maple
    A000178 := proc(n)
        mul(i!,i=1..n) ;
    end proc:
    seq(A000178(n),n=0..10) ; # R. J. Mathar, Oct 30 2015
  • Mathematica
    a[0] := 1; a[1] := 1; a[n_] := n!*a[n - 1]; Table[a[n], {n, 1, 12}] (* Stefan Steinerberger, Mar 10 2006 *)
    Table[BarnesG[n], {n, 2, 14}] (* Zerinvary Lajos, Jul 16 2009 *)
    FoldList[Times,1,Range[20]!] (* Harvey P. Dale, Mar 25 2011 *)
    RecurrenceTable[{a[n] == n! a[n - 1], a[0] == 1}, a, {n, 0, 12}] (* Ray Chandler, Jul 30 2015 *)
    BarnesG[Range[2, 20]] (* Eric W. Weisstein, Jul 14 2017 *)
  • Maxima
    A000178(n):=prod(k!,k,0,n)$ makelist(A000178(n),n,0,30); /* Martin Ettl, Oct 23 2012 */
    
  • PARI
    A000178(n)=prod(k=2,n,k!) \\ M. F. Hasler, Sep 02 2007
    
  • PARI
    a(n)=polcoeff(1-sum(k=0, n-1, a(k)*x^k/prod(j=1, k+1, (1+j!*x+x*O(x^n)) )), n) \\ Paul D. Hanna, Oct 02 2013
    
  • PARI
    for(j=1,13, print1(prod(k=1,j,k^(j-k)),", ")) \\ Hugo Pfoertner, Apr 09 2020
    
  • Python
    A000178_list, n, m = [1], 1,1
    for i in range(1,100):
        m *= i
        n *= m
        A000178_list.append(n) # Chai Wah Wu, Aug 21 2015
    
  • Python
    from math import prod
    def A000178(n): return prod(i**(n-i+1) for i in range(2,n+1)) # Chai Wah Wu, Nov 26 2023
  • Ruby
    def mono_choices(a,b,n)
        n - [a,b].max
    end
    def comm_mono_choices(n)
        accum =1
        0.upto(n-1) do |i|
            i.upto(n-1) do |j|
                accum = accum * mono_choices(i,j,n)
            end
        end
        accum
    end
    1.upto(12) do |k|
        puts comm_mono_choices(k)
    end # Chad Brewbaker, Nov 03 2013
    

Formula

a(0) = 1, a(n) = n!*a(n-1). - Lee Hae-hwang, May 13 2003, corrected by Ilya Gutkovskiy, Jul 30 2016
a(0) = 1, a(n) = 1^n * 2^(n-1) * 3^(n-2) * ... * n = Product_{r=1..n} r^(n-r+1). - Amarnath Murthy, Dec 12 2003 [Formula corrected by Derek Orr, Jul 27 2014]
a(n) = sqrt(A055209(n)). - Philippe Deléham, Mar 07 2004
a(n) = Product_{i=1..n} Product_{j=0..i-1} (i-j). - Paul Barry, Aug 02 2008
log a(n) = 0.5*n^2*log n - 0.75*n^2 + O(n*log n). - Charles R Greathouse IV, Jan 13 2012
Asymptotic: a(n) ~ exp(zeta'(-1) - 3/4 - (3/4)*n^2 - (3/2)*n)*(2*Pi)^(1/2 + (1/2)*n)*(n+1)^((1/2)*n^2 + n + 5/12). For example, a(100) is approx. 0.270317...*10^6941. (See A213080.) - Peter Luschny, Jun 23 2012
G.f.: 1 + x/(U(0) - x) where U(k) = 1 + x*(k+1)! - x*(k+2)!/U(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 02 2012
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - 1/(1 + 1/((k+1)!*x*G(k+1)))); (continued fraction). - Sergei N. Gladkovskii, Jun 14 2013
G.f.: 1 = Sum_{n>=0} a(n)*x^n / Product_{k=1..n+1} (1 + k!*x). - Paul D. Hanna, Oct 02 2013
A203227(n+1)/a(n) -> e, as n -> oo. - Daniel Suteu, Jul 30 2016
From Ilya Gutkovskiy, Jul 30 2016: (Start)
a(n) = G(n+2), where G(n) is the Barnes G-function.
a(n) ~ exp(1/12 - n*(3*n+4)/4)*n^(n*(n+2)/2 + 5/12)*(2*Pi)^((n+1)/2)/A, where A is the Glaisher-Kinkelin constant (A074962).
Sum_{n>=0} (-1)^n/a(n) = A137986. (End)
0 = a(n)*a(n+2)^3 + a(n+1)^2*a(n+2)^2 - a(n+1)^3*a(n+3) for all n in Z (if a(-1)=1). - Michael Somos, Mar 11 2020
Sum_{n>=0} 1/a(n) = A287013 = 1/A137987. - Amiram Eldar, Nov 19 2020
a(n) = Wronskian(1, x, x^2, ..., x^n). - Mohammed Yaseen, Aug 01 2023
From Andrea Pinos, Apr 04 2024: (Start)
a(n) = e^(Sum_{k=1..n} (Integral_{x=1..k+1} Psi(x) dx)).
a(n) = e^(Integral_{x=1..n+1} (log(sqrt(2*Pi)) - (x-1/2) + x*Psi(x)) dx).
a(n) = e^(Integral_{x=1..n+1} (log(sqrt(2*Pi)) - (x-1/2) + (n+1)*Psi(x) - log(Gamma(x))) dx).
Psi(x) is the digamma function. (End)

A000296 Set partitions without singletons: number of partitions of an n-set into blocks of size > 1. Also number of cyclically spaced (or feasible) partitions.

Original entry on oeis.org

1, 0, 1, 1, 4, 11, 41, 162, 715, 3425, 17722, 98253, 580317, 3633280, 24011157, 166888165, 1216070380, 9264071767, 73600798037, 608476008122, 5224266196935, 46499892038437, 428369924118314, 4078345814329009, 40073660040755337, 405885209254049952, 4232705122975949401
Offset: 0

Views

Author

Keywords

Comments

a(n+2) = p(n+1) where p(x) is the unique degree-n polynomial such that p(k) = A000110(k) for k = 0, 1, ..., n. - Michael Somos, Oct 07 2003
Number of complete rhyming schemes.
Whereas the Bell number B(n) (A000110(n)) is the number of terms in the polynomial that expresses the n-th moment of a probability distribution as a function of the first n cumulants, these numbers give the number of terms in the corresponding expansion of the central moment as a function of the first n cumulants. - Michael Hardy (hardy(AT)math.umn.edu), Jan 26 2005
a(n) is the number of permutations on [n] for which the left-to-right maxima coincide with the descents (entries followed by a smaller number). For example, a(4) counts 2143, 3142, 3241, 4123. - David Callan, Jul 20 2005
From Gus Wiseman, Feb 10 2019: (Start)
Also the number of stable partitions of an n-cycle, where a stable partition of a graph is a set partition of the vertex set such that no edge has both ends in the same block. A bijective proof is given in David Callan's article. For example, the a(5) = 11 stable partitions are:
{{1},{2},{3},{4},{5}}
{{1},{2},{3,5},{4}}
{{1},{2,4},{3},{5}}
{{1},{2,5},{3},{4}}
{{1,3},{2},{4},{5}}
{{1,4},{2},{3},{5}}
{{1},{2,4},{3,5}}
{{1,3},{2,4},{5}}
{{1,3},{2,5},{4}}
{{1,4},{2},{3,5}}
{{1,4},{2,5},{3}}
(End)
Also number of partitions of {1, 2, ..., n-1} with singletons. E.g., a(4) = 4: {1|2|3, 12|3, 13|2, 1|23}. Also number of cyclical adjacencies partitions of {1, 2, ..., n-1}. E.g., a(4) = 4: {12|3, 13|2, 1|23, 123}. The two partitions can be mapped by a Kreweras bijection. - Yuchun Ji, Feb 22 2021
Also the k-th central moment of a Poisson random variable with mean 1. a(n) = E[(X-1)^n, X~Poisson(1)]. - Thomas Dybdahl Ahle, Dec 14 2022

Examples

			a(4) = card({{{1, 2}, {3, 4}}, {{1, 4}, {2, 3}}, {{1, 3}, {2, 4}}, {{1, 2, 3, 4}}}) = 4.
		

References

  • Martin Gardner in Sci. Amer. May 1977.
  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.5 (p. 436).
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis, Springer-Verlag, NY, 2 vols., 1972, Vol. 1, p. 228.
  • J. Riordan, A budget of rhyme scheme counts, pp. 455-465 of Second International Conference on Combinatorial Mathematics, New York, April 4-7, 1978. Edited by Allan Gewirtz and Louis V. Quintas. Annals New York Academy of Sciences, 319, 1979.
  • J. Shallit, A Triangle for the Bell numbers, in V. E. Hoggatt, Jr. and M. Bicknell-Johnson, A Collection of Manuscripts Related to the Fibonacci Sequence, 1980, pp. 69-71.
  • 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 of triangle in A106436.
Row sums of the triangle of associated Stirling numbers of second kind A008299. - Philippe Deléham, Feb 10 2005
Row sums of the triangle of basic multinomial coefficients A178866. - Johannes W. Meijer, Jun 21 2010
Row sums of A105794. - Peter Bala, Jan 14 2015
Row sums of A261139, main diagonal of A261137.
Column k=0 of A216963.
Column k=0 of A124323.

Programs

  • Magma
    [1,0] cat [ n le 1 select 1 else Bell(n)-Self(n-1) : n in [1..40]]; // Vincenzo Librandi, Jun 22 2015
    
  • Maple
    spec := [ B, {B=Set(Set(Z,card>1))}, labeled ]; [seq(combstruct[count](spec, size=n), n=0..30)];
    with(combinat): A000296 :=n->(-1)^n + add((-1)^(j-1)*bell(n-j),j=1..n): seq(A000295(n),n=0..30); # Emeric Deutsch, Oct 29 2006
    f:=exp(exp(x)-1-x): fser:=series(f, x=0, 31): 1, seq(n!*coeff(fser, x^n), n=1..23); # Zerinvary Lajos, Nov 22 2006
    G:={P=Set(Set(Atom,card>=2))}: combstruct[gfsolve](G,unlabeled,x): seq(combstruct[count]([P,G,labeled], size=i), i=0..23); # Zerinvary Lajos, Dec 16 2007
    # [a(0),a(1),..,a(n)]
    A000296_list := proc(n)
    local A, R, i, k;
    if n = 0 then return 1 fi;
    A := array(0..n-1);
    A[0] := 1; R := 1;
    for i from 0 to n-2 do
       A[i+1] := A[0] - A[i];
       A[i] := A[0];
       for k from i by -1 to 1 do
          A[k-1] := A[k-1] + A[k] od;
       R := R,A[i+1];
    od;
    R,A[0]-A[i] end:
    A000296_list(100);  # Peter Luschny, Apr 09 2011
  • Mathematica
    nn = 25; Range[0, nn]! CoefficientList[Series[Exp[Exp[x] - 1 - x], {x, 0, nn}], x]
    (* Second program: *)
    a[n_] := a[n] = If[n==0, 1, Sum[Binomial[n-1, i]*a[n-i-1], {i, 1, n-1}]]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 06 2016, after Vladimir Kruchinin *)
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:= Join@@Function[s,Prepend[#,s]&/@spsu[ Select[foo,Complement[#, Complement[set,s]]=={}&], Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[Select[Subsets[Range[n]],Select[Partition[Range[n],2,1,1], Function[ed,Complement[ed,#]=={}]]=={}&],Range[n]]],{n,8}] (* Gus Wiseman, Feb 10 2019 *)
    s = 1; Join[{1}, Table[s = BellB[n] - s, {n, 0, 25}]] (* Vaclav Kotesovec, Jun 20 2022 *)
  • Maxima
    a(n):=if n=0 then 1 else sum(binomial(n-1,i)*a(n-i-1),i,1,n-1); /* Vladimir Kruchinin, Feb 22 2015 */
    
  • PARI
    a(n) = if(n<2, n==0, subst( polinterpolate( Vec( serlaplace( exp( exp( x+O(x^n)/x )-1 ) ) ) ), x, n) )
    
  • Python
    from itertools import accumulate, islice
    def A000296_gen():
        yield from (1,0)
        blist, a, b = (1,), 0, 1
        while True:
            blist = list(accumulate(blist, initial = (b:=blist[-1])))
            yield (a := b-a)
    A000296_list = list(islice(A000296_gen(),20)) # Chai Wah Wu, Jun 22 2022

Formula

E.g.f.: exp(exp(x) - 1 - x).
B(n) = a(n) + a(n+1), where B = A000110 = Bell numbers [Becker].
Inverse binomial transform of Bell numbers (A000110).
a(n)= Sum_{k>=-1} (k^n/(k+1)!)/exp(1). - Vladeta Jovovic and Karol A. Penson, Feb 02 2003
a(n) = Sum_{k=0..n} ((-1)^(n-k))*binomial(n, k)*Bell(k) = (-1)^n + Bell(n) - A087650(n), with Bell(n) = A000110(n). - Wolfdieter Lang, Dec 01 2003
O.g.f.: A(x) = 1/(1-0*x-1*x^2/(1-1*x-2*x^2/(1-2*x-3*x^2/(1-... -(n-1)*x-n*x^2/(1- ...))))) (continued fraction). - Paul D. Hanna, Jan 17 2006
a(n) = Sum_{k = 0..n} {(-1)^(n-k) * Sum_{j = 0..k}((-1)^j * binomial(k,j) * (1-j)^n)/ k!} = sum over row n of A105794. - Tom Copeland, Jun 05 2006
a(n) = (-1)^n + Sum_{j=1..n} (-1)^(j-1)*B(n-j), where B(q) are the Bell numbers (A000110). - Emeric Deutsch, Oct 29 2006
Let A be the upper Hessenberg matrix of order n defined by: A[i, i-1] = -1, A[i,j] = binomial(j-1, i-1), (i <= j), and A[i, j] = 0 otherwise. Then, for n >= 2, a(n) = (-1)^(n)charpoly(A,1). - Milan Janjic, Jul 08 2010
From Sergei N. Gladkovskii, Sep 20 2012, Oct 11 2012, Dec 19 2012, Jan 15 2013, May 13 2013, Jul 20 2013, Oct 19 2013, Jan 25 2014: (Start)
Continued fractions:
G.f.: (2/E(0) - 1)/x where E(k) = 1 + 1/(1 + 2*x/(1 - 2*(k+1)*x/E(k+1))).
G.f.: 1/U(0) where U(k) = 1 - x*k - x^2*(k+1)/U(k+1).
G.f.: G(0)/(1+2*x) where G(k) = 1 - 2*x*(k+1)/((2*k+1)*(2*x*k-x-1) - x*(2*k+1)*(2*k+3)*(2*x*k-x-1)/(x*(2*k+3) - 2*(k+1)*(2*x*k-1)/G(k+1))).
G.f.: (G(0) - 1)/(x-1) where G(k) = 1 - 1/(1+x-k*x)/(1-x/(x-1/G(k+1))).
G.f.: 1 + x^2/(1+x)/Q(0) where Q(k) = 1-x-x/(1-x*(2*k+1)/(1-x-x/(1-x*(2*k+2)/Q(k+1)))).
G.f.: 1/(x*Q(0)) where Q(k) = 1 + 1/(x + x^2/(1 - x - (k+1)/Q(k+1))).
G.f.: -(1+(2*x+1)/G(0))/x where G(k) = x*k - x - 1 - (k+1)*x^2/G(k+1).
G.f.: T(0) where T(k) = 1 - x^2*(k+1)/( x^2*(k+1) - (1-x*k)*(1-x-x*k)/T(k+1)).
G.f.: (1 + x * Sum_{k>=0} (x^k / Product_{p=0..k}(1 - p*x))) / (1 + x). (End)
a(n) = Sum_{i=1..n-1} binomial(n-1,i)*a(n-i-1), a(0)=1. - Vladimir Kruchinin, Feb 22 2015
G.f. A(x) satisfies: A(x) = (1/(1 + x)) * (1 + x * A(x/(1 - x)) / (1 - x)). - Ilya Gutkovskiy, May 21 2021
a(n) ~ exp(n/LambertW(n) - n - 1) * n^(n-1) / (sqrt(1 + LambertW(n)) * LambertW(n)^(n-1)). - Vaclav Kotesovec, Jun 28 2022

Extensions

More terms, new description from Christian G. Bower, Nov 15 1999
a(23) corrected by Sean A. Irvine, Jun 22 2015

A011971 Aitken's array: triangle of numbers {a(n,k), n >= 0, 0 <= k <= n} read by rows, defined by a(0,0)=1, a(n,0) = a(n-1,n-1), a(n,k) = a(n,k-1) + a(n-1,k-1).

Original entry on oeis.org

1, 1, 2, 2, 3, 5, 5, 7, 10, 15, 15, 20, 27, 37, 52, 52, 67, 87, 114, 151, 203, 203, 255, 322, 409, 523, 674, 877, 877, 1080, 1335, 1657, 2066, 2589, 3263, 4140, 4140, 5017, 6097, 7432, 9089, 11155, 13744, 17007, 21147, 21147, 25287, 30304, 36401, 43833, 52922, 64077, 77821, 94828, 115975
Offset: 0

Views

Author

Keywords

Comments

Also called the Bell triangle or the Peirce triangle.
a(n,k) is the number of equivalence relations on {0, ..., n} such that k is not equivalent to n, k+1 is not equivalent to n, ..., n-1 is not equivalent to n. - Don Knuth, Sep 21 2002 [Comment revised by Thijs van Ommen (thijsvanommen(AT)gmail.com), Jul 13 2008]
Named after the New Zealand mathematician Alexander Craig Aitken (1895-1967). - Amiram Eldar, Jun 11 2021

Examples

			Triangle begins:
00:       1
01:       1      2
02:       2      3      5
03:       5      7     10     15
04:      15     20     27     37     52
05:      52     67     87    114    151    203
06:     203    255    322    409    523    674    877
07:     877   1080   1335   1657   2066   2589   3263   4140
08:    4140   5017   6097   7432   9089  11155  13744  17007  21147
09:   21147  25287  30304  36401  43833  52922  64077  77821  94828 115975
10:  115975 137122 162409 192713 229114 272947 325869 389946 467767 562595 678570
...
		

References

  • Jean-Paul Allouche and Jeffrey Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 205.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 212.
  • Donald E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.5 (p. 418).
  • Charles Sanders Peirce, On the Algebra of Logic, American Journal of Mathematics, Vol. 3, pages 15-57, 1880. Reprinted in Collected Papers (1935-1958) and in Writings of Charles S. Peirce: A Chronological Edition (Indiana University Press, Bloomington, IN, 1986).
  • Jeffrey Shallit, A triangle for the Bell numbers, in V. E. Hoggatt, Jr. and M. Bicknell-Johnson, A Collection of Manuscripts Related to the Fibonacci Sequence, 1980, pp. 69-71.

Crossrefs

Borders give Bell numbers A000110. Diagonals give A005493, A011965, A011966, etc., A011968, A011969. Cf. A046934, A011972 (duplicates removed).
Main diagonal is in A094577. Mirror image is in A123346.

Programs

  • GAP
    T:=Flat(List([0..9],n->List([0..n],k->Sum([0..k],i->Binomial(k,i)*Bell(n-k+i))))); # Muniru A Asiru, Oct 26 2018
  • Haskell
    a011971 n k = a011971_tabl !! n !! k
    a011971_row n = a011971_tabl !! n
    a011971_tabl = iterate (\row -> scanl (+) (last row) row) [1]
    -- Reinhard Zumkeller, Dec 09 2012
    
  • Maple
    A011971 := proc(n,k) option remember; if n=0 and k=0 then 1 elif k=0 then A011971(n-1,n-1) else A011971(n,k-1)+A011971(n-1,k-1); fi: end;
    for n from 0 to 12 do lprint([ seq(A011971(n,k),k=0..n) ]); od:
    # Compare the analogue algorithm for the Catalan numbers in A030237.
    BellTriangle := proc(len) local P, T, n; P := [1]; T := [[1]];
    for n from 1 to len - 1 do P := ListTools:-PartialSums([P[-1], op(P)]);
    T := [op(T), P] od; T end:
    BellTriangle(6); ListTools:-Flatten(%); # Peter Luschny, Mar 26 2022
  • Mathematica
    a[0, 0] = 1; a[n_, 0] := a[n, 0] = a[n-1, n-1]; a[n_, k_] := a[n, k] = a[n, k-1] + a[n-1, k-1]; Flatten[ Table[ a[n, k], {n, 0, 9}, {k, 0, n}]] (* Robert G. Wilson v, Mar 27 2004 *)
    Flatten[Table[Sum[Binomial[k, i]*BellB[n-k+i], {i, 0, k}], {n, 0, 9}, {k, 0, n}]] (* Jean-François Alcover, May 24 2016, after Vladeta Jovovic *)
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A011971 = blist = [1]
    for _ in range(10**2):
        b = blist[-1]
        blist = list(accumulate([b]+blist))
        A011971 += blist # Chai Wah Wu, Sep 02 2014, updated Chai Wah Wu, Sep 19 2014
    

Formula

Double-exponential generating function: Sum_{n, k} a(n-k, k) x^n y^k / n! k! = exp(e^{x+y}-1+x). - Don Knuth, Sep 21 2002 [U coordinates, reversed]
a(n,k) = Sum_{i=0..k} binomial(k,i)*Bell(n-k+i). - Vladeta Jovovic, Oct 15 2006

Extensions

Peirce reference from Jon Awbrey, Mar 11 2002
Reference to my paper from Jeffrey Shallit, Jan 23 2015
Moved a comment to A056857 where it belonged. - N. J. A. Sloane, May 02 2015.

A052852 Expansion of e.g.f.: (x/(1-x))*exp(x/(1-x)).

Original entry on oeis.org

0, 1, 4, 21, 136, 1045, 9276, 93289, 1047376, 12975561, 175721140, 2581284541, 40864292184, 693347907421, 12548540320876, 241253367679185, 4909234733857696, 105394372192969489, 2380337795595885156, 56410454014314490981, 1399496554158060983080
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

A simple grammar.
Number of {121,212}-avoiding n-ary words of length n. - Ralf Stephan, Apr 20 2004
The infinite continued fraction (1+n)/(1+(2+n)/(2+(3+n)/(3+...))) converges to the rational number A052852(n)/A000262(n) when n is a positive integer. - David Angell (angell(AT)maths.unsw.edu.au), Dec 18 2008
a(n) is the total number of components summed over all nilpotent partial permutations of [n]. - Geoffrey Critzer, Feb 19 2022

Crossrefs

Row sums of unsigned triangle A062139 (generalized a=2 Laguerre).

Programs

  • Magma
    [n eq 0 select 0 else Factorial(n)*Evaluate(LaguerrePolynomial(n-1, 0), -1): n in [0..30]]; // G. C. Greubel, Feb 23 2021
  • Maple
    spec := [S,{B=Set(C),C=Sequence(Z,1 <= card),S=Prod(B,C)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    a := n -> ifelse(n = 0, 0, n!*hypergeom([-n+1], [1], -1)): seq(simplify(a(n)), n = 0..18);  # Peter Luschny, Dec 30 2024
  • Mathematica
    Table[n!*SeriesCoefficient[(x/(1-x))*E^(x/(1-x)),{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 09 2012 *)
    Table[If[n==0, 0, n!*LaguerreL[n-1, 0, -1]], {n, 0, 30}] (* G. C. Greubel, Feb 23 2021 *)
  • PARI
    my(x='x+O('x^30)); concat([0], Vec(serlaplace((x/(1-x))*exp(x/(1-x))))) \\ G. C. Greubel, May 15 2018
    
  • Sage
    [0 if n==0 else factorial(n)*gen_laguerre(n-1, 0, -1) for n in (0..30)] # G. C. Greubel, Feb 23 2021
    

Formula

D-finite with recurrence: a(1)=1, a(0)=0, (n^2+2*n)*a(n)+(-4-2*n)*a(n+1)+ a(n+2)=0.
a(n) = Sum_{m=0..n} n!*binomial(n+2, n-m)/m!. - Wolfdieter Lang, Jun 19 2001
a(n) = n*A002720(n-1). [Riordan] - Vladeta Jovovic, Mar 18 2005
Related to an n-dimensional series: for n>=1, a(n) = (n!/e)*Sum_{k_n>=k_{n-1}>=...>=k_1>=0} 1/(k_n)!. - Benoit Cloitre, Sep 30 2006
E.g.f.: (x/(1-x))*exp((x/(1-x))) = (x/(1-x))*G(0); G(k)=1+x/((2*k+1)*(1-x)-x*(1-x)*(2*k+1)/(x+(1-x)*(2*k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 24 2011
a(n) = D^n(x*exp(x)) evaluated at x = 0, where D is the operator (1+x)^2*d/dx. Cf. A000262 and A005493. - Peter Bala, Nov 25 2011
a(n) ~ exp(2*sqrt(n)-n-1/2)*n^(n+1/4)/sqrt(2). - Vaclav Kotesovec, Oct 09 2012
a(n) = n!*hypergeom([-n+1], [1], -1) for n>=1. - Peter Luschny, Oct 18 2014 [Simplified by Natalia L. Skirrow, 30 December 2024]
a(n) = Sum_{k=0..n} L(n,k)*k; L(n,k) the unsigned Lah numbers. - Peter Luschny, Oct 18 2014
a(n) = n!*LaguerreL(n-1, 0, -1) for n>=1. - Peter Luschny, Apr 08 2015, simplified Dec 30 2024
The series reversion of the e.g.f. equals W(x)/(1 + W(x)) = x - 2^2*x^2/2! + 3^3*x^3/3! - 4^4*x^4/4! + ..., essentially the e.g.f. for a signed version of A000312, where W(x) is Lambert's W-function (see A000169). - Peter Bala, Jun 14 2016
Equals column A059114(n, 2) for n >= 1. - G. C. Greubel, Feb 23 2021
a(n) = Sum_{k=1..n} k * A271703(n,k). - Geoffrey Critzer, Feb 19 2022

A056857 Triangle read by rows: T(n,c) = number of successive equalities in set partitions of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 5, 6, 3, 1, 15, 20, 12, 4, 1, 52, 75, 50, 20, 5, 1, 203, 312, 225, 100, 30, 6, 1, 877, 1421, 1092, 525, 175, 42, 7, 1, 4140, 7016, 5684, 2912, 1050, 280, 56, 8, 1, 21147, 37260, 31572, 17052, 6552, 1890, 420, 72, 9, 1, 115975, 211470, 186300, 105240, 42630, 13104, 3150, 600, 90, 10, 1
Offset: 1

Views

Author

Winston C. Yang (winston(AT)cs.wisc.edu), Aug 31 2000

Keywords

Comments

Number of successive equalities s_i = s_{i+1} in a set partition {s_1, ..., s_n} of {1, ..., n}, where s_i is the subset containing i, s(1) = 1 and s(i) <= 1 + max of previous s(j)'s.
T(n,c) = number of set partitions of the set {1,2,...,n} in which the size of the block containing the element 1 is k+1. Example: T(4,2)=3 because we have 123|4, 124|3 and 134|2. - Emeric Deutsch, Nov 10 2006
Let P be the lower-triangular Pascal-matrix (A007318), Then this is exp(P) / exp(1). - Gottfried Helms, Mar 30 2007. [This comment was erroneously attached to A011971, but really belongs here. - N. J. A. Sloane, May 02 2015]
From David Pasino (davepasino(AT)yahoo.com), Apr 15 2009: (Start)
As an infinite lower-triangular matrix (with offset 0 rather than 1, so the entries would be B(n - c)*binomial(n, c), B() a Bell number, rather than B(n - 1 - c)*binomial(n - 1, c) as below), this array is S P S^-1 where P is the Pascal matrix A007318, S is the Stirling2 matrix A048993, and S^-1 is the Stirling1 matrix A048994.
Also, S P S^-1 = (1/e)*exp(P). (End)
Exponential Riordan array [exp(exp(x)-1), x]. Equal to A007318*A124323. - Paul Barry, Apr 23 2009
Equal to A049020*A048994 as infinite lower triangular matrices. - Philippe Deléham, Nov 19 2011
Build a superset Q[n] of set partitions of {1,2,...,n} by distinguishing "some" (possibly none or all) of the singletons. Indexed from n >= 0, 0 <= k <= n, T(n,k) is the number of elements in Q[n] that have exactly k distinguished singletons. A singleton is a subset containing one element. T(3,1) = 6 because we have {{1}'{2,3}}, {{1,2}{3}'}, {{1,3}{2}'}, {{1}'{2}{3}}, {{1}{2}'{3}}, {{1}{2}{3}'}. - Geoffrey Critzer, Nov 10 2012
Let Bell(n,x) denote the n-th Bell polynomial, the n-th row polynomial of A048993. Then this is the triangle of connection constants when expressing the basis polynomials Bell(n,x + 1) in terms of the basis polynomials Bell(n,x). For example, row 3 is (5, 6, 3, 1) and 5 + 6*Bell(1,x) + 3*Bell(2,x) + Bell(3,x) = 5 + 6*x + 3*(x + x^2) + (x + 3*x^2 + x^3) = 5 + 10*x + 6*x^2 + x^3 = (x + 1) + 3*(x + 1)^2 + (x + 1)^3 = Bell(3,x + 1). - Peter Bala, Sep 17 2013

Examples

			For example {1, 2, 1, 2, 2, 3} is a set partition of {1, 2, 3, 4, 5, 6} and has 1 successive equality, at i = 4.
Triangle begins:
    1;
    1,   1;
    2,   2,   1;
    5,   6,   3,   1;
   15,  20,  12,   4,   1;
   52,  75,  50,  20,   5,   1;
  203, 312, 225, 100,  30,   6,   1;
  ...
From _Paul Barry_, Apr 23 2009: (Start)
Production matrix is
  1,  1;
  1,  1,  1;
  1,  2,  1,  1;
  1,  3,  3,  1,  1;
  1,  4,  6,  4,  1,  1;
  1,  5, 10, 10,  5,  1,  1;
  1,  6, 15, 20, 15,  6,  1,  1;
  1,  7, 21, 35, 35, 21,  7,  1,  1;
  1,  8, 28, 56, 70, 56, 28,  8,  1,  1; ... (End)
		

References

  • W. C. Yang, Conjectures on some sequences involving set partitions and Bell numbers, preprint, 2000. [Apparently unpublished]

Crossrefs

Cf. Bell numbers A000110 (column c=0), A052889 (c=1), A105479 (c=2), A105480 (c=3).
Cf. A056858-A056863. Essentially same as A056860, where the rows are read from right to left.
Cf. also A007318, A005493, A270953.
See A259691 for another version.
T(2n+1,n+1) gives A124102.
T(2n,n) gives A297926.

Programs

  • Maple
    with(combinat): A056857:=(n,c)->binomial(n-1,c)*bell(n-1-c): for n from 1 to 11 do seq(A056857(n,c),c=0..n-1) od; # yields sequence in triangular form; Emeric Deutsch, Nov 10 2006
    with(linalg): # Yields sequence in matrix form:
    A056857_matrix := n -> subs(exp(1)=1, exponential(exponential(
    matrix(n,n,[seq(seq(`if`(j=k+1,j,0),k=0..n-1),j=0..n-1)])))):
    A056857_matrix(8); # Peter Luschny, Apr 18 2011
  • Mathematica
    t[n_, k_] := BellB[n-1-k]*Binomial[n-1, k]; Flatten[ Table[t[n, k], {n, 1, 11}, {k, 0, n-1}]](* Jean-François Alcover, Apr 25 2012, after Emeric Deutsch *)
  • PARI
    B(n) = sum(k=0, n, stirling(n, k, 2));
    tabl(nn)={for(n=1, nn, for(k=0, n - 1, print1(B(n - 1 - k) * binomial(n - 1, k),", ");); print(););};
    tabl(12); \\ Indranil Ghosh, Mar 19 2017
    
  • Python
    from sympy import bell, binomial
    for n in range(1,12):
        print([bell(n - 1 - k) * binomial(n - 1, k) for k in range(n)]) # Indranil Ghosh, Mar 19 2017
    
  • SageMath
    def a(n): return (-1)^n / factorial(n)
    @cached_function
    def p(n, m):
        R = PolynomialRing(QQ, "x")
        if n == 0: return R(a(m))
        return R((m + x)*p(n - 1, m) - (m + 1)*p(n - 1, m + 1))
    for n in range(11): print(p(n, 0).list())  # Peter Luschny, Jun 18 2023

Formula

T(n,c) = B(n-1-c)*binomial(n-1, c), where T(n,c) is the number of set partitions of {1, ..., n} that have c successive equalities and B() is a Bell number.
E.g.f.: exp(exp(x)+x*y-1). - Vladeta Jovovic, Feb 13 2003
G.f.: 1/(1-xy-x-x^2/(1-xy-2x-2x^2/(1-xy-3x-3x^2/(1-xy-4x-4x^2/(1-... (continued fraction). - Paul Barry, Apr 23 2009
Considered as triangle T(n,k), 0 <= k <= n: T(n,k) = A007318(n,k)*A000110(n-k) and Sum_{k=0..n} T(n,k)*x^k = A000296(n), A000110(n), A000110(n+1), A005493(n), A005494(n), A045379(n) for x = -1, 0, 1, 2, 3, 4 respectively. - Philippe Deléham, Dec 13 2009
Let R(n,x) denote the n-th row polynomial of the triangle. Then A000110(n+j) = Bell(n+j,1) = Sum_{k = 1..n} R(j,k)*Stirling2(n,k) (Spivey). - Peter Bala, Sep 17 2013

Extensions

More terms from David Wasserman, Apr 22 2002

A143494 Triangle read by rows: 2-Stirling numbers of the second kind.

Original entry on oeis.org

1, 2, 1, 4, 5, 1, 8, 19, 9, 1, 16, 65, 55, 14, 1, 32, 211, 285, 125, 20, 1, 64, 665, 1351, 910, 245, 27, 1, 128, 2059, 6069, 5901, 2380, 434, 35, 1, 256, 6305, 26335, 35574, 20181, 5418, 714, 44, 1, 512, 19171, 111645, 204205, 156660, 58107, 11130, 1110, 54, 1
Offset: 2

Views

Author

Peter Bala, Aug 20 2008

Keywords

Comments

This is the case r = 2 of the r-Stirling numbers of the second kind. The 2-Stirling numbers of the second kind give the number of ways of partitioning the set {1,2,...,n} into k nonempty disjoint subsets with the restriction that the elements 1 and 2 belong to distinct subsets.
More generally, the r-Stirling numbers of the second kind give the number of ways of partitioning the set {1,2,...,n} into k nonempty disjoint subsets with the restriction that the numbers 1, 2, ..., r belong to distinct subsets. The case r = 1 gives the usual Stirling numbers of the second kind A008277; for other cases see A143495 (r = 3) and A143496 (r = 4).
The lower unitriangular array of r-Stirling numbers of the second kind equals the matrix product P^(r-1) * S (with suitable offsets in the row and column indexing), where P is Pascal's triangle, A007318 and S is the array of Stirling numbers of the second kind, A008277.
For the definition of and entries relating to the corresponding r-Stirling numbers of the first kind see A143491. For entries on r-Lah numbers refer to A143497. The theory of r-Stirling numbers of both kinds is developed in [Broder].
From Peter Bala, Sep 19 2008: (Start)
Let D be the derivative operator d/dx and E the Euler operator x*d/dx. Then x^(-2)*E^n*x^2 = Sum_{k = 0..n} T(n+2,k+2)*x^k*D^k.
The row generating polynomials R_n(x) := Sum_{k= 2..n} T(n,k)*x^k satisfy the recurrence R_(n+1)(x) = x*R_n(x) + x*d/dx(R_n(x)) with R_2(x) = x^2. It follows that the polynomials R_n(x) have only real zeros (apply Corollary 1.2. of [Liu and Wang]).
Relation with the 2-Eulerian numbers E_2(n,j) := A144696(n,j): T(n,k) = 2!/k!*Sum_ {j = n-k..n-2} E_2(n,j)*binomial(j,n-k) for n >= k >= 2. (End)
From Wolfdieter Lang, Sep 29 2011: (Start)
T(n,k) = S(n,k,2), n>=k>=2, in Mikhailov's first paper, eq.(28) or (A3). E.g.f. column no. k from (A20) with k->2, r->k. Therefore, with offset [0,0], this triangle is the Sheffer triangle (exp(2*x),exp(x)-1) with e.g.f. of column no. m>=0: exp(2*x)*((exp(x)-1)^m)/m!. See one of the formulas given below. For Sheffer matrices see the W. Lang link under A006232 with the S. Roman reference, also found in A132393. (End)

Examples

			Triangle begins
  n\k|...2....3....4....5....6....7
  =================================
  2..|...1
  3..|...2....1
  4..|...4....5....1
  5..|...8...19....9....1
  6..|..16...65...55...14....1
  7..|..32..211..285..125...20....1
  ...
T(4,3) = 5. The set {1,2,3,4} can be partitioned into three subsets such that 1 and 2 belong to different subsets in 5 ways: {{1}{2}{3,4}}, {{1}{3}{2,4}}, {{1}{4}{2,3}}, {{2}{3}{1,4}} and {{2}{4}{1,3}}; the remaining possibility {{1,2}{3}{4}} is not allowed.
From _Peter Bala_, Feb 23 2025: (Start)
The array factorizes as
/ 1               \       /1             \ /1             \ /1            \
| 2    1           |     | 2   1          ||0  1           ||0  1          |
| 4    5   1       |  =  | 4   3   1      ||0  2   1       ||0  0  1       | ...
| 8   19   9   1   |     | 8   7   4  1   ||0  4   3  1    ||0  0  2  1    |
|16   65  55  14  1|     |16  15  11  6  1||0  8   7  4  1 ||0  0  4  3  1 |
|...               |     |...             ||...            ||...           |
where, in the infinite product on the right-hand side, the first array is the Riordan array (1/(1 - 2*x), x/(1 - x)). See A055248. (End)
		

Crossrefs

A001047 (column 3), A005493 (row sums), A008277, A016269 (column 4), A025211 (column 5), A049444 (matrix inverse), A074051 (alt. row sums).

Programs

  • Maple
    with combinat: T := (n, k) -> (1/(k-2)!)*add ((-1)^(k-i)*binomial(k-2,i)*(i+2)^(n-2),i = 0..k-2): for n from 2 to 11 do seq(T(n, k), k = 2..n) end do;
  • Mathematica
    t[n_, k_] := StirlingS2[n, k] - StirlingS2[n-1, k]; Flatten[ Table[ t[n, k], {n, 2, 11}, {k, 2, n}]] (* Jean-François Alcover, Dec 02 2011 *)
  • Sage
    @CachedFunction
    def stirling2r(n, k, r) :
        if n < r: return 0
        if n == r: return 1 if k == r else 0
        return stirling2r(n-1,k-1,r) + k*stirling2r(n-1,k,r)
    A143494 = lambda n,k: stirling2r(n, k, 2)
    for n in (2..6):
        [A143494(n, k) for k in (2..n)] # Peter Luschny, Nov 19 2012

Formula

T(n+2,k+2) = (1/k!)*Sum_{i = 0..k} (-1)^(k-i)*C(k,i)*(i+2)^n, n,k >= 0.
T(n,k) = Stirling2(n,k) - Stirling2(n-1,k) for n, k >= 2.
Recurrence relation: T(n,k) = T(n-1,k-1) + k*T(n-1,k) for n > 2, with boundary conditions T(n,1) = T(1,n) = 0 for all n, T(2,2) = 1 and T(2,k) = 0 for k > 2. Special cases: T(n,2) = 2^(n-2); T(n,3) = 3^(n-2) - 2^(n-2).
As a sum of monomial functions of degree m: T(n+m,n) = Sum_{2 <= i_1 <= ... <= i_m <= n} (i_1*i_2*...*i_m). For example, T(6,4) = Sum_{2 <= i <= j <= 4} (i*j) = 2*2 + 2*3 + 2*4 + 3*3 + 3*4 + 4*4 = 55.
E.g.f. column k+2 (with offset 2): 1/k!*exp(2*x)*(exp(x) - 1)^k.
O.g.f. k-th column: Sum_{n >= k} T(n,k)*x^n = x^k/((1-2*x)*(1-3*x)*...*(1-k*x)).
E.g.f.: exp(2*t + x*(exp(t) - 1)) = Sum_{n >= 0} Sum_{k = 0..n} T(n+2,k+2) *x^k*t^n/n! = Sum_{n >= 0} B_n(2;x)*t^n/n! = 1 + (2 + x)*t/1! + (4 + 5*x + x^2)*t^2/2! + ..., where the row polynomial B_n(2;x) := Sum_{k = 0..n} T(n+2,k+2)*x^k denotes the 2-Bell polynomial.
Dobinski-type identities: Row polynomial B_n(2;x) = exp(-x)*Sum_{i >= 0} (i + 2)^n*x^i/i!. Sum_{k = 0..n} k!*T(n+2,k+2)*x^k = Sum_{i >= 0} (i + 2)^n*x^i/(1 + x)^(i+1).
The T(n,k) are the connection coefficients between falling factorials and the shifted monomials (x + 2)^(n-2). For example, from row 4 we have 4 + 5*x + x*(x - 1) = (x + 2)^2, while from row 5 we have 8 + 19*x + 9*x*(x - 1) + x*(x - 1)*(x - 2) = (x + 2)^3.
The row sums of the array are the 2-Bell numbers, B_n(2;1), equal to A005493(n-2). The alternating row sums are the complementary 2-Bell numbers, B_n(2;-1), equal to (-1)^n*A074051(n-2).
This array is the matrix product P * S, where P denotes the Pascal triangle, A007318 and S denotes the lower triangular array of Stirling numbers of the second kind, A008277 (apply Theorem 10 of [Neuwirth]).
Also, this array equals the transpose of the upper triangular array A126351. The inverse array is A049444, the signed 2-Stirling numbers of the first kind. See A143491 for the unsigned version of the inverse.
Let f(x) = exp(exp(x)). Then for n >= 1, the row polynomials R(n,x) are given by R(n+2,exp(x)) = 1/f(x)*(d/dx)^n(exp(2*x)*f(x)). Similar formulas hold for A008277, A039755, A105794, A111577 and A154537. - Peter Bala, Mar 01 2012

A055248 Triangle of partial row sums of triangle A007318(n,m) (Pascal's triangle). Triangle A008949 read backwards. Riordan (1/(1-2x), x/(1-x)).

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 7, 4, 1, 16, 15, 11, 5, 1, 32, 31, 26, 16, 6, 1, 64, 63, 57, 42, 22, 7, 1, 128, 127, 120, 99, 64, 29, 8, 1, 256, 255, 247, 219, 163, 93, 37, 9, 1, 512, 511, 502, 466, 382, 256, 130, 46, 10, 1, 1024, 1023, 1013, 968, 848, 638, 386, 176, 56, 11, 1
Offset: 0

Views

Author

Wolfdieter Lang, May 26 2000

Keywords

Comments

In the language of the Shapiro et al. reference (also given in A053121) such a lower triangular (ordinary) convolution array, considered as matrix, belongs to the Riordan-group. The g.f. for the row polynomials p(n,x) (increasing powers of x) is 1/((1-2*z)*(1-x*z/(1-z))).
Binomial transform of the all 1's triangle: as a Riordan array, it factors to give (1/(1-x),x/(1-x))(1/(1-x),x). Viewed as a number square read by antidiagonals, it has T(n,k) = Sum_{j=0..n} binomial(n+k,n-j) and is then the binomial transform of the Whitney square A004070. - Paul Barry, Feb 03 2005
Riordan array (1/(1-2x), x/(1-x)). Antidiagonal sums are A027934(n+1), n >= 0. - Paul Barry, Jan 30 2005; edited by Wolfdieter Lang, Jan 09 2015
Eigensequence of the triangle = A005493: (1, 3, 10, 37, 151, 674, ...); row sums of triangles A011971 and A159573. - Gary W. Adamson, Apr 16 2009
Read as a square array, this is the generalized Riordan array ( 1/(1 - 2*x), 1/(1 - x) ) as defined in the Bala link (p. 5), which factorizes as ( 1/(1 - x), x/(1 - x) )*( 1/(1 - x), x )*( 1, 1 + x ) = P*U*transpose(P), where P denotes Pascal's triangle, A007318, and U is the lower unit triangular array with 1's on or below the main diagonal. - Peter Bala, Jan 13 2016

Examples

			The triangle a(n,m) begins:
n\m    0    1    2   3   4   5   6   7  8  9 10 ...
0:     1
1:     2    1
2:     4    3    1
3:     8    7    4   1
4:    16   15   11   5   1
5:    32   31   26  16   6   1
6:    64   63   57  42  22   7   1
7:   128  127  120  99  64  29   8   1
8:   256  255  247 219 163  93  37   9  1
9:   512  511  502 466 382 256 130  46 10  1
10: 1024 1023 1013 968 848 638 386 176 56 11  1
... Reformatted. - _Wolfdieter Lang_, Jan 09 2015
Fourth row polynomial (n=3): p(3,x)= 8 + 7*x + 4*x^2 + x^3.
The matrix inverse starts
   1;
  -2,   1;
   2,  -3,   1;
  -2,   5,  -4,    1;
   2,  -7,   9,   -5,    1;
  -2,   9, -16,   14,   -6,    1;
   2, -11,  25,-  30,   20,   -7,    1;
  -2,  13, -36,   55,  -50,   27,   -8,    1;
   2, -15,  49,  -91,  105,  -77,   35,   -9,  1;
  -2,  17, -64,  140, -196,  182, -112,   44, -10,   1;
   2, -19,  81, -204,  336, -378,  294, -156,  54, -11, 1;
   ...
which may be related to A029653. - _R. J. Mathar_, Mar 29 2013
From _Peter Bala_, Dec 23 2014: (Start)
With the array M(k) as defined in the Formula section, the infinite product M(0)*M(1)*M(2)*... begins
/1      \ /1        \ /1       \       /1       \
|2 1     ||0 1       ||0 1      |      |2  1     |
|4 3 1   ||0 2 1     ||0 0 1    |... = |4  5 1   |
|8 7 4 1 ||0 4 3 1   ||0 0 2 1  |      |8 19 9 1 |
|...     ||0 8 7 4 1 ||0 0 4 3 1|      |...      |
|...     ||...       ||...      |      |         |
= A143494. (End)
Matrix factorization of square array as P*U*transpose(P):
/1      \ /1        \ /1 1 1 1 ...\    /1  1  1  1 ...\
|1 1     ||1 1       ||0 1 2 3 ... |   |2  3  4  5 ... |
|1 2 1   ||1 1 1     ||0 0 1 3 ... | = |4  7 11 16 ... |
|1 3 3 1 ||1 1 1 1   ||0 0 0 1 ... |   |8 15 26 42 ... |
|...     ||...       ||...         |   |...            |
- _Peter Bala_, Jan 13 2016
		

Crossrefs

Column sequences: A000079 (powers of 2, m=0), A000225 (m=1), A000295 (m=2), A002662 (m=3), A002663 (m=4), A002664 (m=5), A035038 (m=6), A035039 (m=7), A035040 (m=8), A035041 (m=9), A035042 (m=10).
Row sums: A001792(n) = A055249(n, 0).
Alternating row sums: A011782.
Cf. A011971, A159573. - Gary W. Adamson, Apr 16 2009

Programs

  • Haskell
    a055248 n k = a055248_tabl !! n !! k
    a055248_row n = a055248_tabl !! n
    a055248_tabl = map reverse a008949_tabl
    -- Reinhard Zumkeller, Jun 20 2015
  • Maple
    T := (n,k) -> 2^n - (1/2)*binomial(n, k-1)*hypergeom([1, n + 1], [n-k + 2], 1/2).
    seq(seq(simplify(T(n,k)), k=0..n),n=0..10); # Peter Luschny, Oct 10 2019
  • Mathematica
    a[n_, m_] := Sum[ Binomial[n, m + j], {j, 0, n}]; Table[a[n, m], {n, 0, 10}, {m, 0, n}] // Flatten (* Jean-François Alcover, Jul 05 2013, after Paul Barry *)
    T[n_, k_] := Binomial[n, k] * Hypergeometric2F1[1, k - n, k + 1, -1];
    Flatten[Table[T[n, k], {n, 0, 7}, {k, 0, n}]]  (* Peter Luschny, Oct 06 2023 *)

Formula

a(n, m) = A008949(n, n-m), if n > m >= 0.
a(n, m) = Sum_{k=m..n} A007318(n, k) (partial row sums in columns m).
Column m recursion: a(n, m) = Sum_{j=m..n-1} a(j, m) + A007318(n, m) if n >= m >= 0, a(n, m) := 0 if n
G.f. for column m: (1/(1-2*x))*(x/(1-x))^m, m >= 0.
a(n, m) = Sum_{j=0..n} binomial(n, m+j). - Paul Barry, Feb 03 2005
Inverse binomial transform (by columns) of A112626. - Ross La Haye, Dec 31 2006
T(2n,n) = A032443(n). - Philippe Deléham, Sep 16 2009
From Peter Bala, Dec 23 2014: (Start)
Exp(x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(x)*(8 + 7*x + 4*x^2/2! + x^3/3!) = 8 + 15*x + 26*x^2/2! + 42*x^3/3! + 64*x^4/4! + .... The same property holds more generally for Riordan arrays of the form ( f(x), x/(1 - x) ).
Let M denote the present triangle. For k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/ having the k X k identity matrix I_k as the upper left block; in particular, M(0) = M. The infinite product M(0)*M(1)*M(2)*..., which is clearly well-defined, is equal to A143494 (but with a different offset). See the Example section. Cf. A106516. (End)
a(n,m) = Sum_{p=m..n} 2^(n-p)*binomial(p-1,m-1), n >= m >= 0, else 0. - Wolfdieter Lang, Jan 09 2015
T(n, k) = 2^n - (1/2)*binomial(n, k-1)*hypergeom([1, n+1], [n-k+2], 1/2). - Peter Luschny, Oct 10 2019
T(n, k) = binomial(n, k)*hypergeom([1, k - n], [k + 1], -1). - Peter Luschny, Oct 06 2023
n-th row polynomial R(n, x) = (2^n - x*(1 + x)^n)/(1 - x). These polynomials can be used to find series acceleration formulas for the constants log(2) and Pi. - Peter Bala, Mar 03 2025
Showing 1-10 of 86 results. Next