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 13 results. Next

A001792 a(n) = (n+2)*2^(n-1).

Original entry on oeis.org

1, 3, 8, 20, 48, 112, 256, 576, 1280, 2816, 6144, 13312, 28672, 61440, 131072, 278528, 589824, 1245184, 2621440, 5505024, 11534336, 24117248, 50331648, 104857600, 218103808, 452984832, 939524096, 1946157056, 4026531840, 8321499136, 17179869184, 35433480192
Offset: 0

Views

Author

Keywords

Comments

Number of parts in all compositions (ordered partitions) of n + 1. For example, a(2) = 8 because in 3 = 2 + 1 = 1 + 2 = 1 + 1 + 1 we have 8 parts. Also number of compositions (ordered partitions) of 2n + 1 with exactly 1 odd part. For example, a(2) = 8 because the only compositions of 5 with exactly 1 odd part are 5 = 1 + 4 = 2 + 3 = 3 + 2 = 4 + 1 = 1 + 2 + 2 = 2 + 1 + 2 = 2 + 2 + 1. - Emeric Deutsch, May 10 2001
Binomial transform of natural numbers [1, 2, 3, 4, ...].
For n >= 1 a(n) is also the determinant of the n X n matrix with 3's on the diagonal and 1's elsewhere. - Ahmed Fares (ahmedfares(AT)my-deja.com), May 06 2001
The arithmetic mean of first n terms of the sequence is 2^(n-1). - Amarnath Murthy, Dec 25 2001, corrected by M. F. Hasler, Dec 17 2016
Also the number of "winning paths" of length n across an n X n Hex board. Satisfies the recursion a(n) = 2a(n-1) + 2^(n-2). - David Molnar (molnar(AT)stolaf.edu), Apr 10 2002
Diagonal in A053218. - Benoit Cloitre, May 08 2002
Let M_n be the n X n matrix m_(i, j) = 1 + abs(i-j) then det(M_n) = (-1)^(n-1)*a(n-1). - Benoit Cloitre, May 28 2002
Absolute value of determinant of n X n matrix of form: [1 2 3 4 5 / 2 1 2 3 4 / 3 2 1 2 3 / 4 3 2 1 2 / 5 4 3 2 1]. - Benoit Cloitre, Jun 20 2002
Number of ones in all (n+1)-bit integers (cf. A000120). - Ralf Stephan, Aug 02 2003
This sequence also emerges as a floretion force transform of powers of 2 (see program code). Define a(-1) = 0 (as the sequence is returned by FAMP). Then a(n-1) + A098156(n+1) = 2*a(n) (conjecture). - Creighton Dement, Mar 14 2005
This sequence gives the absolute value of the determinant of the Toeplitz matrix with first row containing the first n integers. - Paul Max Payton, May 23 2006
Equals sums of rows right of left edge of A102363 divided by three, + 2^K. - David G. Williams (davidwilliams(AT)paxway.com), Oct 08 2007
If X_1, X_2, ..., X_n are 2-blocks of a (2n+1)-set X then, for n >= 1, a(n) is the number of (n+1)-subsets of X intersecting each X_i, (i = 1, 2, ..., n). - Milan Janjic, Nov 18 2007
Also, a(n-1) is the determinant of the n X n matrix with A[i, j] = n - |i-j|. - M. F. Hasler, Dec 17 2008
1/2 the number of permutations of 1 .. (n+2) arranged in a circle with exactly one local maximum. - R. H. Hardin, Apr 19 2009
The first corrector line for transforming 2^n offset 0 with a leading 1 into the Fibonacci sequence. - Al Hakanson (hawkuu(AT)gmail.com), Jun 01 2009
a(n) is the number of runs of consecutive 1's in all binary sequences of length (n+1). - Geoffrey Critzer, Jul 02 2009
Let X_j (0 < j <= 2^n) all the subsets of N_n; m(i, j) := if {i} in X_j then 1 else 0. Let A = transpose(M).M; Then a(i, j) = (number of elements)|X_i intersect X_j|. Determinant(X*I-A) = (X-(n+1)*2^(n-2))*(X-2^(n-2))^(n-1)*X^(2^n-n).
Eigenvector for (n+1)*2^(n-2) is V_i=|X_i|.
Sum_{k=1..2^n} |X_i intersect X_k|*|X_k| = (n+1)*2^(n-2)*|X_i|.
Eigenvectors for 2^(n-2) are {line(M)[i] - line(M)[j], 1 <= i, j <= n}. - CLARISSE Philippe (clarissephilippe(AT)yahoo.fr), Mar 24 2010
The sequence b(n) = 2*A001792(n), for n >= 1 with b(0) = 1, is an elephant sequence, see A175655. For the central square four A[5] vectors, with decimal values 187, 190, 250 and 442, lead to the b(n) sequence. For the corner squares these vectors lead to the companion sequence A134401. - Johannes W. Meijer, Aug 15 2010
Equals partial sums of A045623: (1, 2, 5, 12, 28, ...); where A045623 = the convolution square of (1, 1, 2, 4, 8, 16, 32, ...). - Gary W. Adamson, Oct 26 2010
Equals (1, 2, 4, 8, 16, ...) convolved with (1, 1, 2, 4, 8, 16, ...); e.g., a(3) = 20 = (1, 1, 2, 4) dot (8, 4, 2, 1) = (8 + 4 + 4 + 4). - Gary W. Adamson, Oct 26 2010
This sequence seems to give the first x+1 nonzero terms in the sequence derived by subtracting the m-th term in the x_binacci sequence (where the first term is one and the y-th term is the sum of x terms immediately preceding it) from 2^(m-2). - Dylan Hamilton, Nov 03 2010
Recursive formulas for a(n) are in many cases derivable from its property wherein delta^k(a(n)) - a(n) = k*2^n where delta^k(a(n)) represents the k-th forward difference of a(n). Provable with a difference table and a little induction. - Ethan Beihl, May 02 2011
Let f(n,k) be the sum of numbers in the subsets of size k of {1, 2, ..., n}. Then a(n-1) is the average of the numbers f(n, 0), ... f(n, n). Example: (f(3, 1), f(3, 2), f(3, 3)) = (6, 12, 6), with average (6+12+6)/3. - Clark Kimberling, Feb 24 2012
a(n) is the number of length-2n binary sequences that contain a subsequence of ones with length n or more. To derive this result, note that there are 2^n sequences where the initial one of the subsequence occurs at entry one. If the initial one of the subsequence occurs at entry 2, 3, ..., or n + 1, there are 2^(n-1) sequences since a zero must precede the initial one. Hence a(n) = 2^n + n*2^(n-1)=(n+2)2^(n-1). An example is given in the example section below. - Dennis P. Walsh, Oct 25 2012
As the total number of parts in all compositions of n+1 (see the first line in Comments) the equivalent sequence for partitions is A006128. On the other hand, as the first differences of A001787 (see the first line in Crossrefs) the equivalent sequence for partitions is A138879. - Omar E. Pol, Aug 28 2013
a(n) is the number of spanning trees of the complete tripartite graph K_{n,1,1}. - James Mahoney, Oct 24 2013
a(n-1) = denominator of the mean (2n/(n+1), after reduction), of the compositions of n; numerator is given by A022998(n). - Clark Kimberling, Mar 11 2014
From Tom Copeland, Nov 09 2014: (Start)
The shifted array belongs to an interpolated family of arrays associated to the Catalan A000108 (t=1), and Riordan, or Motzkin sums A005043 (t=0), with the interpolating o.g.f. (1-sqrt(1-4x/(1+(1-t)x)))/2 and inverse x(1-x)/(1+(t-1)x(1-x)). See A091867 for more info on this family. Here the interpolation is t=-3 (mod signs in the results).
Let C(x) = (1 - sqrt(1-4x))/2, an o.g.f. for the Catalan numbers A000108, with inverse Cinv(x) = x*(1-x) and P(x,t) = x/(1+t*x) with inverse P(x,-t).
Shifted o.g.f: G(x) = x*(1-x)/(1 - 4x*(1-x)) = P[Cinv(x),-4].
Inverse o.g.f: Ginv(x) = [1 - sqrt(1 - 4*x/(1+4x))]/2 = C[P(x, 4)] (signed shifted A001700). Cf. A030528. (End)
For n > 0, element a(n) of the sequence is equal to the gradients of the (n-1)-th row of Pascal triangle multiplied with the square of the integers from n+1,...,1. I.e., row 3 of Pascal's triangle 1,3,3,1 has gradients 1,2,0,-2,-1, so a(4) = 1*(5^2) + 2*(4^2) + 0*(3^2) - 2*(2^2) - 1*(1^2) = 48. - Jens Martin Carlsson, May 18 2017
Number of self-avoiding paths connecting all the vertices of a convex (n+2)-gon. - Ivaylo Kortezov, Jan 19 2020
a(n-1) is the total number of elements of subsets of {1,2,..,n} that contain n. For example, for n = 3, a(2) = 8, and the subsets of {1,2,3} that contain 3 are {3}, {1,3}, {2,3}, {1,2,3}, with a total of 8 elements. - Enrique Navarrete, Aug 01 2020

Examples

			a(0) = 1, a(1) = 2*1 + 1 = 3, a(2) = 2*3 + 2 = 8, a(3) = 2*8 + 4 = 20, a(4) = 2*20 + 8 = 48, a(5) = 2*48 + 16 = 112, a(6) = 2*112 + 32 = 256, ... - _Philippe Deléham_, Apr 19 2009
a(2) = 8 since there are 8 length-4 binary sequences with a subsequence of ones of length 2 or more, namely, 1111, 1110, 1101, 1011, 0111, 1100, 0110, and 0011. - _Dennis P. Walsh_, Oct 25 2012
G.f. = 1 + 3*x + 8*x^2 + 20*x^3 + 48*x^4 + 112*x^5 + 256*x^6 + 576*x^7 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 795.
  • 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).
  • A. M. Stepin and A. T. Tagi-Zade, Words with restrictions, pp. 67-74 of Kvant Selecta: Combinatorics I, Amer. Math. Soc., 2001 (G_n on p. 70).

Crossrefs

First differences of A001787.
a(n) = A049600(n, 1), a(n) = A030523(n + 1, 1).
Cf. A053113.
Row sums of triangles A008949 and A055248.
a(n) = -A039991(n+2, 2).
If the exponent E in a(n) = Sum_{m=0..n} (Sum_{k=0..m} C(n,k))^E is 1, 2, 3, 4, 5 we get A001792, A003583, A007403, A294435, A294436 respectively.

Programs

  • GAP
    List([0..35],n->(n+2)*2^(n-1)); # Muniru A Asiru, Sep 25 2018
    
  • Haskell
    a001792 n = a001792_list !! n
    a001792_list = scanl1 (+) a045623_list
    -- Reinhard Zumkeller, Jul 21 2013
    
  • Magma
    [(n+2)*2^(n-1): n in [0..40]]; // Vincenzo Librandi, Nov 10 2014
    
  • Maple
    A001792 := n-> (n+2)*2^(n-1);
    spec := [S, {B=Set(Z, 0 <= card), S=Prod(Z, B, B)}, labeled]: seq(combstruct[count](spec, size=n)/4, n=2..30); # Zerinvary Lajos, Oct 09 2006
    A001792:=-(-3+4*z)/(2*z-1)^2; # Simon Plouffe in his 1992 dissertation, which gives the sequence without the initial 1
    G(x):=1/exp(2*x)*(1-x): f[0]:=G(x): for n from 1 to 54 do f[n]:=diff(f[n-1],x) od: x:=0: seq(abs(f[n]),n=0..28 ); # Zerinvary Lajos, Apr 17 2009
    a := n -> hypergeom([-n, 2], [1], -1);
    seq(round(evalf(a(n),32)), n=0..31); # Peter Luschny, Aug 02 2014
  • Mathematica
    matrix[n_Integer /; n >= 1] := Table[Abs[p - q] + 1, {q, n}, {p, n}]; a[n_Integer /; n >= 1] := Abs[Det[matrix[n]]] (* Josh Locker (joshlocker(AT)macfora.com), Apr 29 2004 *)
    g[n_,m_,r_] := Binomial[n - 1, r - 1] Binomial[m + 1, r] r; Table[1 + Sum[g[n, k - n, r], {r, 1, k}, {n, 1, k - 1}], {k, 1, 29}] (* Geoffrey Critzer, Jul 02 2009 *)
    a[n_] := (n + 2)*2^(n - 1); a[Range[0, 40]] (* Vladimir Joseph Stephan Orlovsky, Feb 09 2011 *)
    LinearRecurrence[{4, -4}, {1, 3}, 40] (* Harvey P. Dale, Aug 29 2011 *)
    CoefficientList[Series[(1 - x) / (1 - 2 x)^2, {x, 0, 40}], x] (* Vincenzo Librandi, Nov 10 2014 *)
    b[i_]:=i; a[n_]:=Abs[Det[ToeplitzMatrix[Array[b, n], Array[b, n]]]]; Array[a, 40] (* Stefano Spezia, Sep 25 2018 *)
    a[n_]:=Hypergeometric2F1[2,-n+1,1,-1];Array[a,32] (* Giorgos Kalogeropoulos, Jan 04 2022 *)
  • PARI
    A001792(n)=(n+2)<<(n-1) \\ M. F. Hasler, Dec 17 2008
    
  • Python
    for n in range(0,40): print(int((n+2)*2**(n-1)), end=' ') # Stefano Spezia, Oct 16 2018

Formula

a(n) = (n+2)*2^(n-1).
G.f.: (1 - x)/(1 - 2*x)^2 = 2F1(1,3;2;2x).
a(n) = 4*a(n-1) - 4*a(n-2).
G.f. (-1 + (1-2*x)^(-2))/(x*2^2). - Wolfdieter Lang
a(n) = A018804(2^n). - Matthew Vandermast, Mar 01 2003
a(n) = Sum_{k=0..n+2} binomial(n+2, 2k)*k. - Paul Barry, Mar 06 2003
a(n) = (1/4)*A001787(n+2). - Emeric Deutsch, May 24 2003
With a leading 0, this is ((n+1)2^n - 0^n)/4 = Sum_{m=0..n} binomial(n - 1, m - 1)*m, the binomial transform of A004526(n+1). - Paul Barry, Jun 05 2003
a(n) = Sum_{k=0..n} binomial(n, k)*(k + 1). - Lekraj Beedassy, Jun 24 2004
a(n) = A000244(n) - A066810(n). - Ross La Haye, Apr 29 2006
Row sums of triangle A130585. - Gary W. Adamson, Jun 06 2007
Equals A125092 * [1/1, 1/2, 1/3, ...]. - Gary W. Adamson, Nov 16 2007
a(n) = (n+1)*2^n - n*2^(n-1). Equals A128064 * A000079. - Gary W. Adamson, Dec 28 2007
G.f.: F(3, 1; 2; 2x). - Paul Barry, Sep 03 2008
a(n) = 1 + Sum_{k=1..n} (n - k + 4)2^(n - k - 1). This follows from the result that the number of parts equal to k in all compositions of n is (n - k + 3)2^(n - k - 2) for 0 < k < n. - Geoffrey Critzer, Sep 21 2008
a(n) = 2^(n-1) + 2 a(n-1) ; a(n-1) = det(n - |i - j|){i, j = 1..n}. - _M. F. Hasler, Dec 17 2008
a(n) = 2*a(n-1) + 2^(n-1). - Philippe Deléham, Apr 19 2009
a(n) = A164910(2^n). - Gary W. Adamson, Aug 30 2009
a(n) = Sum_{i=1..2^n} gcd(i, 2^n) = A018804(2^n). So we have: 2^0 * phi(2^n) + ... + 2^n * phi(2^0) = (n + 2)*2^(n-1), where phi is the Euler totient function. - Jeffrey R. Goodwin, Nov 11 2011
a(n) = Sum_{j=0..n} Sum_{i=0..n} binomial(n, i + j). - Yalcin Aktar, Jan 17 2012
Eigensequence of an infinite lower triangular matrix with 2^n as the left border and the rest 1's. - Gary W. Adamson, Jan 30 2012
G.f.: 1 + 2*x*U(0) where U(k) = 1 + (k + 1)/(2 - 8*x/(4*x + (k + 1)/U(k + 1))); (continued fraction, 3 - step). - Sergei N. Gladkovskii, Oct 19 2012
a(n) = Sum_{k=0..n} Sum_{j=0..k} binomial(n,j). - Peter Luschny, Dec 03 2013
a(n) = Hyper2F1([-n, 2], [1], -1). - Peter Luschny, Aug 02 2014
G.f.: 1 / (1 - 3*x / (1 + x / (3 - 4*x))). - Michael Somos, Aug 26 2015
a(n) = -A053120(2+n, n), n >= 0, the negative of the third (sub)diagonal of the triangle of Chebyshev's T polynomials. - Wolfdieter Lang, Nov 26 2019
From Amiram Eldar, Jan 12 2021: (Start)
Sum_{n>=0} 1/a(n) = 8*log(2) - 4.
Sum_{n>=0} (-1)^n/a(n) = 4 - 8*log(3/2). (End)
E.g.f.: exp(2*x)*(1 + x). - Stefano Spezia, Jun 11 2021

A046802 T(n, k) = Sum_{j=k..n} binomial(n, j)*E1(j, j-k), where E1 are the Eulerian numbers A173018. Triangle read by rows, T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 7, 1, 1, 15, 33, 15, 1, 1, 31, 131, 131, 31, 1, 1, 63, 473, 883, 473, 63, 1, 1, 127, 1611, 5111, 5111, 1611, 127, 1, 1, 255, 5281, 26799, 44929, 26799, 5281, 255, 1, 1, 511, 16867, 131275, 344551, 344551, 131275, 16867, 511, 1, 1, 1023, 52905
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is the number of positroid cells of the totally nonnegative Grassmannian G+(k,n) (cf. Postnikov/Williams). It is the triangle of the h-vectors of the stellahedra. - Tom Copeland, Oct 10 2014
See A248727 for a simple transformation of the row polynomials of this entry that produces the umbral compositional inverses of the polynomials of A074909, related to the face polynomials of the simplices. - Tom Copeland, Jan 21 2015
From Tom Copeland, Jan 24 2015: (Start)
The reciprocal of this entry's e.g.f. is [t e^(-xt) - e^(-x)] / (t-1) = 1 - (1+t) x + (1+t+t^2) x^2/2! - (1+t+t^2+t^3) x^3/3! + ... = e^(q.(0;t)x), giving the base sequence (q.(0;t))^n = q_n(0;t) = (-1)^n [1-t^(n+1)] / (1-t) for the umbral compositional inverses (q.(0;t)+z)^n = q_n(z;t) of the Appell polynomials associated with this entry, p_n(z;t) below, i.e., q_n(p.(z;t)) = z^n = p_n(q.(z;t)), in umbral notation. The relations in A133314 then apply between the two sets of base polynomials. (Inserted missing index in a formula - Mar 03 2016.)
The associated o.g.f. for the umbral inverses is Og(x) = x / (1-x q.(0:t)) = x / [(1+x)(1+tx)] = x / [1+(1+t)x+tx^2]. Applying A134264 to h(x) = x / Og(x) = 1 + (1+t) x + t x^2 leads to an o.g.f. for the Narayana polynomials A001263 as the comp. inverse Oginv(x) = [1-(1+t)x-sqrt[1-2(1+t)x+((t-1)x)^2]] / (2xt). Note that Og(x) gives the signed h-polynomials of the simplices and that Oginv(x) gives the h-polynomials of the simplicial duals of the Stasheff polynomials, or type A associahedra. Contrast this with A248727 = A046802 * A007318, which has o.g.f.s related to the corresponding f-polynomials. (End)
The Appell polynomials p_n(x;t) in the formulas below specialize to the Swiss-knife polynomials of A119879 for t = -1, so the Springer numbers A001586 are given by 2^n p_n(1/2;-1). - Tom Copeland, Oct 14 2015
The row polynomials are the h-polynomials associated to the stellahedra, whose f-polynomials are the row polynomials of A248727. Cf. page 60 of the Buchstaber and Panov link. - Tom Copeland, Nov 08 2016
The row polynomials are the h-polynomials of the stellohedra, which enumerate partial permutations according to descents. Cf. Section 10.4 of the Postnikov-Reiner-Williams reference. - Lauren Williams, Jul 05 2022
From p. 60 of the Buchstaber and Panov link, S = P * C / T where S, P, C, and T are the bivariate e.g.f.s of the h vectors of the stellahedra, permutahedra, hypercubes, and (n-1)-simplices, respectively. - Tom Copeland, Jan 09 2017
The number of Le-diagrams of type (k, n) this means the diagram uses the bounding box size k x (n-k), equivalently the number of Grassmann necklaces of type (k, n) and also the number of decorated permutations with k anti-exceedances. - Thomas Scheuerle, Dec 29 2024

Examples

			The triangle T(n, k) begins:
n\k 0   1     2      3      4      5      6     7
0:  1
1:  1   1
2:  1   3     1
3:  1   7     7      1
4:  1  15    33     15      1
5:  1  31   131    131     31      1
6:  1  63   473    883    473     63      1
7:  1 127  1611   5111   5111   1611    127     1
... Reformatted. - _Wolfdieter Lang_, Feb 14 2015
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, Holland, 1974, page 245 [From Roger L. Bagula, Nov 21 2009]
  • D. Singh, The numbers L(m,n) and their relations with prepared Bernoulli and Eulerian numbers, Math. Student, 20 (1952), 66-70.

Crossrefs

Programs

  • Maple
    T := (n, k) -> add(binomial(n, r)*combinat:-eulerian1(r, r-k), r = k .. n):
    for n from 0 to 8 do seq(T(n, k), k=0..n) od; # Peter Luschny, Jun 27 2018
  • Mathematica
    t[, 1] = 1; t[n, n_] = 1; t[n_, 2] = 2^(n-1)-1;
    t[n_, k_] = Sum[((i-k+1)^i*(k-i)^(n-i-1) - (i-k+2)^i*(k-i-1)^(n-i-1))*Binomial[n-1, i], {i, 0, k-1}];
    T[n_, k_] := t[n+1, k+1]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten
    (* Jean-François Alcover, Jan 22 2015, after Tom Copeland *)
    T[ n_, k_] := Coefficient[n! SeriesCoefficient[(1-x) Exp[t] / (1 - x Exp[(1-x) t]), {t, 0, n}] // Simplify, x, k];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] (* Michael Somos, Jan 22 2015 *)

Formula

E.g.f.: (y-1)*exp(x*y)/(y-exp((y-1)*x)). - Vladeta Jovovic, Sep 20 2003
p(t,x) = (1 - x)*exp(t)/(1 - x*exp(t*(1 - x))). - Roger L. Bagula, Nov 21 2009
With offset=0, T(n,0)=1 otherwise T(n,k) = sum_{i=0..k-1} C(n,i)((i-k)^i*(k-i+1)^(n-i) - (i-k+1)^i*(k-i)^(n-i)) (cf. Williams). - Tom Copeland, Oct 10 2014
With offset 0, T = A007318 * A123125. Second column is A000225; 3rd, appears to be A066810. - Tom Copeland, Jan 23 2015
A raising operator (with D = d/dx) associated with this entry's row polynomials is R = x + t + (1-t) / [1-t e^{(1-t)D}] = x + t + 1 + t D + (t+t^2) D^2/2! + (t+4t^2+t^3) D^3/3! + ... , containing the e.g.f. for the Eulerian polynomials of A123125. Then R^n 1 = (p.(0;t)+x)^n = p_n(x;t) are the Appell polynomials with this entry's row polynomials p_n(0;t) as the base sequence. Examples of this formalism are given in A028246 and A248727. - Tom Copeland, Jan 24 2015
With offset 0, T = A007318*(padded A090582)*(inverse of A097805) = A007318*(padded A090582)*(padded A130595) = A007318*A123125 = A007318*(padded A090582)*A007318*A097808*A130595, where padded matrices are of the form of padded A007318, which is A097805. Inverses of padded matrices are just the padded versions of inverses of the unpadded matrices. This relates the face vectors, or f-vectors, and h-vectors of the permutahedra / permutohedra to those of the stellahedra / stellohedra. - Tom Copeland, Nov 13 2016
Umbrally, the row polynomials (offset 0) are r_n(x) = (1 + q.(x))^n, where (q.(x))^k = q_k(x) are the row polynomials of A123125. - Tom Copeland, Nov 16 2016
From the previous umbral statement, OP(x,d/dy) y^n = (y + q.(x))^n, where OP(x,y) = exp[y * q.(x)] = (1-x)/(1-x*exp((1-x)y)), the e.g.f. of A123125, so OP(x,d/dy) y^n evaluated at y = 1 is r_n(x), the n-th row polynomial of this entry, with offset 0. - Tom Copeland, Jun 25 2018
Consolidating some formulas in this entry and A248727, in umbral notation for concision, with all offsets 0: Let A_n(x;y) = (y + E.(x))^n, an Appell sequence in y where E.(x)^k = E_k(x) are the Eulerian polynomials of A123125. Then the row polynomials of this entry (A046802, the h-polynomials of the stellahedra) are given by h_n(x) = A_n(x;1); the row polynomials of A248727 (the face polynomials of the stellahedra), by f_n(x) = A_n(1 + x;1); the Swiss-knife polynomials of A119879, by Sw_n(x) = A_n(-1;1 + x); and the row polynomials of the Worpitsky triangle (A130850), by w_n(x) = A(1 + x;0). Other specializations of A_n(x;y) give A090582 (the f-polynomials of the permutohedra, cf. also A019538) and A028246 (another version of the Worpitsky triangle). - Tom Copeland, Jan 24 2020
From Peter Luschny, Apr 30 2021: (Start)
Sum_{k=0..n} (-1)^k*T(n, k) = A122045(n).
Sum_{k=0..n} 2^(n-k)*T(n,k) = A007047(n).
Sum_{k=0..n} T(n, n-k) = A000522(n).
Sum_{k=0..n} T(n-k, k) = Sum_{k=0..n} (n - k)^k = A026898(n-1) for n >= 1.
Sum_{k=0..n} k*T(n, k) = A036919(n) = floor(n*n!*e/2).
(End)

Extensions

More terms from Vladeta Jovovic, Sep 20 2003
First formula corrected by Wolfdieter Lang, Feb 14 2015
Offset set to 0 and edited by Peter Luschny, Apr 30 2021

A050488 a(n) = 3*(2^n-1) - 2*n.

Original entry on oeis.org

0, 1, 5, 15, 37, 83, 177, 367, 749, 1515, 3049, 6119, 12261, 24547, 49121, 98271, 196573, 393179, 786393, 1572823, 3145685, 6291411, 12582865, 25165775, 50331597, 100663243, 201326537, 402653127, 805306309, 1610612675, 3221225409, 6442450879, 12884901821, 25769803707
Offset: 0

Views

Author

James Sellers, Dec 26 1999

Keywords

Comments

Number of words of length n+1 where first element is from {0,1,2}, other elements are from {0,1} and sequence does not decrease (for n=2 there are 3*2^2 sequences, but 000, 100, 110, 111, 200, 210, 211 decrease, so a(2) = 12-7 = 5).
Number of subgroups of C_(2^n) X C_(2^n) (see A060724).
Starting with 1 = row sums of triangle A054582. - Gary W. Adamson, Jun 23 2008
Starting with "1" equals the eigensequence of a triangle with integer squares (1, 4, 9, 16, ...) as the left border and the rest 1's. - Gary W. Adamson, Jul 24 2010
(1 + 2x + 2x^2 + 2x^3 + ...)*(1 + 3x + 7x^2 + 15x^3 + ...) = (1 + 5x + 15x^2 + 37x^3 + ...). - Gary W. Adamson, Mar 14 2012
The partial sums of A033484. - J. M. Bergot, Oct 03 2012
Binomial transform is 0, 1, 7, 33, ... (shifted A066810); inverse binomial transform is 0, 1, 3, 3, ... (3 repeated). - R. J. Mathar, Oct 05 2012
Define a triangle by T(n,0) = n*(n+1) + 1, T(n,n) = n + 1, and T(r,c) = T(r-1,c-1) + T(r-1,c) otherwise; then a(n+1) is the sum of the terms of row n. - J. M. Bergot, Mar 30 2013
Starting with "1" are also the antidiagonal sums of the array formed by partial sums of integer squares (1, 4, 9, 16, ...). - Luciano Ancora, Apr 24 2015
Sums of 2 adjacent terms in diagonal k=2 of Eulerian triangle A008292. I.e., T(n,2)+T(n-1,2) for n > 0. Also, 4th NW-SE diagonal of A126277. In other words, a(n) = A000295(n) + A000295(n+1). - Gregory Gerard Wojnar, Sep 30 2018

Crossrefs

Programs

  • GAP
    List([0..30],n->3*(2^n-1)-2*n); # Muniru A Asiru, Oct 26 2018
    
  • Haskell
    a050488 n = sum $ zipWith (*) a000079_list (reverse $ take n a005408_list)
    -- Reinhard Zumkeller, Jul 24 2015
    
  • Magma
    [3*(2^n-1) - 2*n: n in [0..30]]; // G. C. Greubel, Oct 23 2018
    
  • Maple
    seq(coeff(series(x*(x+1)/((1-x)^2*(1-2*x)),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Oct 26 2018
  • Mathematica
    Table[3(2^n-1)-2n,{n,0,30}] (* or *) LinearRecurrence[{4,-5,2}, {0,1,5}, 40] (* Harvey P. Dale, Apr 09 2018 *)
  • PARI
    a(n)=3*(2^n-1)-2*n \\ Charles R Greathouse IV, Sep 24 2015
    
  • Python
    for n in range(0, 30): print(3*(2**n-1) - 2*n, end=', ') # Stefano Spezia, Oct 27 2018

Formula

Row sums of A125165: (1, 5, 15, 37, ...). Binomial transform of [1, 4, 6, 6, 6, ...] = [1, 5, 15, 37, ...]. 4th diagonal from the right of A126777 = (1, 5, 15, ...). - Gary W. Adamson, Dec 23 2006
a(n) = 2*a(n-1) + (2n-1). - Gary W. Adamson, Sep 30 2007
From Johannes W. Meijer, Feb 20 2009: (Start)
a(n+1) = A156920(n+1,1).
a(n+1) = A156919(n+1,1)/2^n.
a(n+1) = A142963(n+2,1)/2.
a(n) = 4a(n-1) - 5a(n-2) + 2a(n-3) for n>2 with a(0) = 0, a(1) = 1, a(2) = 5.
G.f.: z*(1+z)/((1-z)^2*(1-2*z)).
(End)
a(n) = 2*n + 2*a(n-1) - 1 (with a(0)=0). - Vincenzo Librandi, Aug 06 2010
a(n+1) = Sum_{k=0..n} A000079(k) * A005408(n-k), convolution of the powers of 2 with the odd numbers. - Reinhard Zumkeller, Mar 08 2012
E.g.f.: exp(x)*(3*exp(x) - 2*x - 3). - Stefano Spezia, May 15 2023

A238858 Triangle T(n,k) read by rows: T(n,k) is the number of length-n ascent sequences with exactly k descents.

Original entry on oeis.org

1, 1, 0, 2, 0, 0, 4, 1, 0, 0, 8, 7, 0, 0, 0, 16, 33, 4, 0, 0, 0, 32, 131, 53, 1, 0, 0, 0, 64, 473, 429, 48, 0, 0, 0, 0, 128, 1611, 2748, 822, 26, 0, 0, 0, 0, 256, 5281, 15342, 9305, 1048, 8, 0, 0, 0, 0, 512, 16867, 78339, 83590, 21362, 937, 1, 0, 0, 0, 0, 1024, 52905, 376159, 647891, 307660, 35841, 594, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Mar 06 2014

Keywords

Comments

The sequence of column k satisfies a linear recurrence with constant coefficients of order k*(k+5)/2 = A055998(k) for k>0.
T(2n,n) gives A241871(n).
Last nonzero elements of rows give A241881(n).
Row sums give A022493.

Examples

			Triangle starts:
00:     1;
01:     1,      0;
02:     2,      0,       0;
03:     4,      1,       0,       0;
04:     8,      7,       0,       0,       0;
05:    16,     33,       4,       0,       0,      0;
06:    32,    131,      53,       1,       0,      0,     0;
07:    64,    473,     429,      48,       0,      0,     0,   0;
08:   128,   1611,    2748,     822,      26,      0,     0,   0, 0;
09:   256,   5281,   15342,    9305,    1048,      8,     0,   0, 0, 0;
10:   512,  16867,   78339,   83590,   21362,    937,     1,   0, 0, 0, 0;
11:  1024,  52905,  376159,  647891,  307660,  35841,   594,   0, 0, 0, 0, 0;
12:  2048, 163835, 1728458, 4537169, 3574869, 834115, 45747, 262, 0, 0, 0, 0, 0;
...
The 53 ascent sequences of length 5 together with their numbers of descents are (dots for zeros):
01:  [ . . . . . ]   0      28:  [ . 1 1 . 1 ]   1
02:  [ . . . . 1 ]   0      29:  [ . 1 1 . 2 ]   1
03:  [ . . . 1 . ]   1      30:  [ . 1 1 1 . ]   1
04:  [ . . . 1 1 ]   0      31:  [ . 1 1 1 1 ]   0
05:  [ . . . 1 2 ]   0      32:  [ . 1 1 1 2 ]   0
06:  [ . . 1 . . ]   1      33:  [ . 1 1 2 . ]   1
07:  [ . . 1 . 1 ]   1      34:  [ . 1 1 2 1 ]   1
08:  [ . . 1 . 2 ]   1      35:  [ . 1 1 2 2 ]   0
09:  [ . . 1 1 . ]   1      36:  [ . 1 1 2 3 ]   0
10:  [ . . 1 1 1 ]   0      37:  [ . 1 2 . . ]   1
11:  [ . . 1 1 2 ]   0      38:  [ . 1 2 . 1 ]   1
12:  [ . . 1 2 . ]   1      39:  [ . 1 2 . 2 ]   1
13:  [ . . 1 2 1 ]   1      40:  [ . 1 2 . 3 ]   1
14:  [ . . 1 2 2 ]   0      41:  [ . 1 2 1 . ]   2
15:  [ . . 1 2 3 ]   0      42:  [ . 1 2 1 1 ]   1
16:  [ . 1 . . . ]   1      43:  [ . 1 2 1 2 ]   1
17:  [ . 1 . . 1 ]   1      44:  [ . 1 2 1 3 ]   1
18:  [ . 1 . . 2 ]   1      45:  [ . 1 2 2 . ]   1
19:  [ . 1 . 1 . ]   2      46:  [ . 1 2 2 1 ]   1
20:  [ . 1 . 1 1 ]   1      47:  [ . 1 2 2 2 ]   0
21:  [ . 1 . 1 2 ]   1      48:  [ . 1 2 2 3 ]   0
22:  [ . 1 . 1 3 ]   1      49:  [ . 1 2 3 . ]   1
23:  [ . 1 . 2 . ]   2      50:  [ . 1 2 3 1 ]   1
24:  [ . 1 . 2 1 ]   2      51:  [ . 1 2 3 2 ]   1
25:  [ . 1 . 2 2 ]   1      52:  [ . 1 2 3 3 ]   0
26:  [ . 1 . 2 3 ]   1      53:  [ . 1 2 3 4 ]   0
27:  [ . 1 1 . . ]   1
There are 16 ascent sequences with no descent, 33 with one, and 4 with 2, giving row 4 [16, 33, 4, 0, 0, 0].
		

Crossrefs

Cf. A137251 (ascent sequences with k ascents), A242153 (ascent sequences with k flat steps).

Programs

  • Maple
    # b(n, i, t): polynomial in x where the coefficient of x^k is   #
    #             the number of postfixes of these sequences of     #
    #             length n having k descents such that the prefix   #
    #             has rightmost element i and exactly t ascents     #
    b:= proc(n, i, t) option remember; `if`(n=0, 1, expand(add(
          `if`(ji, 1, 0)), j=0..t+1)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, -1$2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, Sum[If[ji, 1, 0]], {j, 0, t+1}]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, -1, -1]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 06 2015, translated from Maple *)
  • Sage
    # Transcription of the Maple program
    R. = QQ[]
    @CachedFunction
    def b(n,i,t):
        if n==0: return 1
        return sum( ( x if ji) ) for j in range(t+2) )
    def T(n): return b(n, -1, -1)
    for n in range(0,10): print(T(n).list())

A144696 Triangle of 2-Eulerian numbers.

Original entry on oeis.org

1, 1, 2, 1, 7, 4, 1, 18, 33, 8, 1, 41, 171, 131, 16, 1, 88, 718, 1208, 473, 32, 1, 183, 2682, 8422, 7197, 1611, 64, 1, 374, 9327, 49780, 78095, 38454, 5281, 128, 1, 757, 30973, 264409, 689155, 621199, 190783, 16867, 256
Offset: 2

Author

Peter Bala, Sep 19 2008

Keywords

Comments

Let [n] denote the ordered set {1,2,...,n}. The symmetric group S_n consists of the injective mappings p:[n] -> [n]. Such a permutation p has an excedance at position i, 1 <= i < n, if p(i) > i. One well-known interpretation of the Eulerian numbers A(n,k) is that they count the permutations in the symmetric group S_n with k excedances. The triangle of Eulerian numbers is A008292 (but with an offset of 1 in the column numbering). We generalize this definition to restricted permutations as follows.
Let r be a nonnegative integer and let Permute(n,n-r) denote the set of injective maps p:[n-r] -> [n], which we think of as permutations of n numbers taken n-r at a time. Clearly, |Permute(n,n-r)| = n!/r!. We say that p has an excedance at position i, 1 <= i <= n-r, if p(i) > i. Then the r-Eulerian number, denoted by A(r;n,k), is defined as the number of permutations in Permute(n,n-r) having k excedances. Thus the current array of 2-Eulerian numbers gives the number of permutations in Permute(n,n-2) with k excedances. See the example section below for some numerical examples.
Clearly A(0;n,k) = A(n,k). The case r = 1 also produces the ordinary Eulerian numbers A(n,k). There is an obvious bijection from Permute(n,n) to Permute(n,n-1) that preserves the number of excedances of a permutation. Consequently, the 1-Eulerian numbers are equal to the 0-Eulerian numbers: A(1;n,k) = A(0;n,k) = A(n,k).
For other cases of r-Eulerian numbers see A144697 (r = 3), A144698 (r = 4) and A144699 (r = 5). There is also a concept of r-Stirling numbers of the first and second kinds - see A143491 and A143494. If we multiply the entries of the current array by a factor of 2 and then reverse the rows we obtain A120434.
An alternative interpretation of the current array due to [Strosser] involves the 2-excedance statistic of a permutation (see also [Foata & Schutzenberger, Chapitre 4, Section 3]). We define a permutation p in Permute(n,n-2) to have a 2-excedance at position i (1 <=i <= n-2) if p(i) >= i + 2.
Given a permutation p in Permute(n,n-2), define ~p to be the permutation in Permute(n,n-2) that takes i to n+1 - p(n-i-1). The map ~ is a bijection of Permute(n,n-2) with the property that if p has (resp. does not have) an excedance in position i then ~p does not have (resp. has) a 2-excedance at position n-i-1. Hence ~ gives a bijection between the set of permutations with k excedances and the set of permutations with (n-k) 2-excedances. Thus reading the rows of this array in reverse order gives a triangle whose entries count the permutations in Permute(n,n-2) with k 2-excedances.
Example: Represent a permutation p:[n-2] -> [n] in Permute(n,n-2) by its image vector (p(1),...,p(n-2)). In Permute(10,8) the permutation p = (1,2,4,7,10,6,5,8) does not have an excedance in the first two positions (i = 1 and 2) or in the final three positions (i = 6, 7 and 8). The permutation ~p = (3,6,5,1,4,7,9,10) has 2-excedances only in the first three positions and the final two positions.
From Peter Bala, Dec 27 2019: (Start)
This is the array A(1,1,3) in the notation of Hwang et al. (p. 25), where the authors remark that the r-Eulerian numbers were first studied by Shanlan Li (Duoji Bilei, Ch. 4), who gave the summation formulas
Sum_{i = 2..n+1} (i-1)*C(i,2) = C(n+3,4) + 2*C(n+2,4)
Sum_{i = 2..n+1} (i-1)^2*C(i,2) = C(n+4,5) + 7*C(n+3,5) + 4*C(n+2,5)
Sum_{i = 2..n+1} (i-1)^3*C(i,2) = C(n+5,6) + 18*C(n+4,6) + 33*C(n+3,6) + 8*C(n+2,6). (End)

Examples

			The triangle begins
===========================================
n\k|..0.....1.....2.....3.....4.....5.....6
===========================================
2..|..1
3..|..1.....2
4..|..1.....7.....4
5..|..1....18....33.....8
6..|..1....41...171...131....16
7..|..1....88...718..1208...473....32
8..|..1...183..2682..8422..7197..1611....64
...
Row 4 = [1,7,4]: We represent a permutation p:[n-2] -> [n] in Permute(n,n-2) by its image vector (p(1),...,p(n-2)). Here n = 4. The permutation (1,2) has no excedances; 7 permutations have a single excedance, namely, (1,3), (1,4), (2,1), (3,1), (3,2), (4,1) and (4,2); the remaining 4 permutations, (2,3), (2,4), (3,4) and (4,3) each have two excedances.
		

References

  • J. Riordan. An introduction to combinatorial analysis. New York, J. Wiley, 1958.
  • R. Strosser. Séminaire de théorie combinatoire, I.R.M.A., Université de Strasbourg, 1969-1970.
  • Li, Shanlan (1867). Duoji bilei (Series summation by analogies), 4 scrolls. In Zeguxizhai suanxue (Mathematics from the Studio Devoted to the Imitation of the Ancient Chinese Tradition) (Jinling ed.), Volume 4.
  • Li, Shanlan (2019). Catégories analogues d’accumulations discrètes (Duoji bilei), traduit et commenté par Andrea Bréard. La Bibliothèque Chinoise. Paris: Les Belles Lettres.

Crossrefs

Cf. A000079 (right diagonal), A001710 (row sums).
Cf. A000182 (related to alt. row sums).

Programs

  • Magma
    m:=2; [(&+[(-1)^(k-j)*Binomial(n+1,k-j)*Binomial(j+m,m-1)*(j+1)^(n-m+1): j in [0..k]])/m: k in [0..n-m], n in [m..m+10]]; // G. C. Greubel, Jun 04 2022
    
  • Maple
    with(combinat):
    T:= (n,k) -> 1/2!*add((-1)^(k-j)*binomial(n+1,k-j)*(j+1)^(n-1)*(j+2), j = 0..k):
    for n from 2 to 10 do
    seq(T(n,k),k = 0..n-2)
    end do;
  • Mathematica
    T[n_, k_]:= 1/2!*Sum[(-1)^(k-j)*Binomial[n+1, k-j]*(j+1)^(n-1)*(j+2), {j, 0, k}];
    Table[T[n, k], {n,2,10}, {k,0,n-2}]//Flatten (* Jean-François Alcover, Oct 15 2019 *)
  • SageMath
    m=2 # A144696
    def T(n,k): return (1/m)*sum( (-1)^(k-j)*binomial(n+1,k-j)*binomial(j+m,m-1)*(j+1)^(n-m+1) for j in (0..k) )
    flatten([[T(n,k) for k in (0..n-m)] for n in (m..m+10)]) # G. C. Greubel, Jun 04 2022

Formula

T(n,k) = (1/2!)*Sum_{j = 0..k} (-1)^(k-j)*binomial(n+1,k-j)*(j+1)^(n-1)*(j+2);
T(n,n-k) = (1/2!)*Sum_{j = 2..k} (-1)^(k-j)*binomial(n+1,k-j)*j^(n-1)*(j-1).
Recurrence relations:
T(n,k) = (k+1)*T(n-1,k) + (n-k)*T(n-1,k-1) with boundary conditions T(n,0) = 1 for n >= 2, T(2,k) = 0 for k >= 1. Special cases: T(n,n-2) = 2^(n-2); T(n,n-3) = A066810(n-1).
E.g.f. (with suitable offsets): (1/2)*[(1 - x)/(1 - x*exp(t - t*x))]^2 = 1/2 + x*t + (x + 2*x^2)*t^2/2! + (x + 7*x^2 + 4*x^3)*t^3/3! + ... .
The row generating polynomials R_n(x) satisfy the recurrence R_(n+1)(x) = (n*x+1)*R_n(x) + x*(1-x)*d/dx(R_n(x)) with R_2(x) = 1. It follows that the polynomials R_n(x) for n >= 3 have only real zeros (apply Corollary 1.2. of [Liu and Wang]).
The (n+1)-th row generating polynomial = (1/2!)*Sum_{k = 1..n} (k+1)!*Stirling2(n,k) *x^(k-1)*(1-x)^(n-k).
For n >= 2,
(1/2)*(x*d/dx)^(n-1) (1/(1-x)^2) = x/(1-x)^(n+1) * Sum_{k = 0..n-2} T(n,k)*x^k,
(1/2)*(x*d/dx)^(n-1) (x^2/(1-x)^2) = 1/(1-x)^(n+1) * Sum_{k = 2..n} T(n,n-k)*x^k,
1/(1-x)^(n+1)*Sum_{k = 0..n-2} T(n,k)*x^k = (1/2!) * Sum_{m = 0..inf} (m+1)^(n-1)*(m+2)*x^m,
1/(1-x)^(n+1)*Sum_{k = 2..n} T(n,n-k)*x^k = (1/2!) * Sum_{m = 2..inf} m^(n-1)*(m-1)*x^m.
Worpitzky-type identities:
Sum_{k = 0..n-2} T(n,k)*binomial(x+k,n) = (1/2!)*x^(n-1)*(x - 1);
Sum_{k = 2..n} T(n,n-k)*binomial(x+k,n) = (1/2!)*(x + 1)^(n-1)*(x + 2).
Relation with Stirling numbers (Frobenius-type identities):
T(n+1,k-1) = (1/2!) * Sum_{j = 0..k} (-1)^(k-j)*(j+1)!* binomial(n-j,k-j)*Stirling2(n,j) for n,k >= 1;
T(n+1,k-1) = (1/2!) * Sum_{j = 0..n-k} (-1)^(n-k-j)*(j+1)!* binomial(n-j,k)*S(2;n+2,j+2) for n,k >= 1 and
T(n+2,k) = (1/2!) * Sum_{j = 0..n-k} (-1)^(n-k-j)*(j+2)!* binomial(n-j,k)*S(2;n+2,j+2) for n,k >= 0, where S(2;n,k) denotes the 2-Stirling numbers A143494(n,k).
The row polynomials of this array are related to the Eulerian polynomials. For example, 1/2*x*d/dx [x*(x + 4*x^2 + x^3)/(1-x)^4] = x^2*(1 + 7*x + 4*x^2)/(1-x)^5 and 1/2*x*d/dx [x*(x + 11*x^2 + 11*x^3 + x^4)/(1-x)^5] = x^2*(1 + 18*x + 33*x^2 + 8*x^3)/(1-x)^6.
Row sums A001710. Alternating row sums [1, -1, -2, 8, 16, -136, -272, 3968, 7936, ... ] are alternately (signed) tangent numbers and half tangent numbers - see A000182.
Sum_{k = 0..n-2} 2^k*T(n,k) = A069321(n-1). Sum_{k = 0..n-2} 2^(n-k)*T(n,k) = 4*A083410(n-1).
For n >=2, the shifted row polynomial t*R(n,t) = (1/2)*D^(n-1)(f(x,t)) evaluated at x = 0, where D is the operator (1-t)*(1+x)*d/dx and f(x,t) = (1+x*t/(t-1))^(-2). - Peter Bala, Apr 22 2012

A112626 Triangle read by rows: T(n,k) = Sum_{j=0..n} binomial(n, k+j)*2^(n-k-j).

Original entry on oeis.org

1, 3, 1, 9, 5, 1, 27, 19, 7, 1, 81, 65, 33, 9, 1, 243, 211, 131, 51, 11, 1, 729, 665, 473, 233, 73, 13, 1, 2187, 2059, 1611, 939, 379, 99, 15, 1, 6561, 6305, 5281, 3489, 1697, 577, 129, 17, 1, 19683, 19171, 16867, 12259, 6883, 2851, 835, 163, 19, 1, 59049, 58025
Offset: 0

Author

Ross La Haye, Dec 26 2005

Keywords

Comments

T(n, 0) = A000244(n), T(n, 1) = A001047(n), T(n, 2) = A066810(n).
Column 0 is the row sums of A038207 starting at column 0, column 1 is the row sums of A038207 starting at column 1 etc. etc. Helpful suggestions related to Riordan arrays given by Paul Barry.
Riordan array ( 1/(1 - 3*x), x/(1 - 2*x) ). Matrix inverse is a signed version of A209149. - Peter Bala, Jul 17 2013
T(n,k) is the number of strings of length n over an alphabet of 3 letters that contain a given string of length k as a subsequence. - Robert Israel, Jan 14 2020

Examples

			Triangle begins as:
    1;
    3,   1;
    9,   5,   1;
   27,  19,   7,   1;
   81,  65,  33,   9,  1;
  243, 211, 131,  51, 11,  1;
  729, 665, 473, 233, 73, 13, 1...
		

Crossrefs

Row sums = n*3^(n-1) + 3^n = A006234(n+3) (Frank Ruskey and class).
Cf. A209149 (unsigned matrix inverse).

Programs

  • GAP
    Flat(List([0..10], n-> List([0..n], k-> Sum([k..n], j-> Binomial(n, j)*2^(n-j)) ))); # G. C. Greubel, Nov 18 2019
  • Magma
    [&+[Binomial(n,j)*2^(n-j): j in [k..n]]: k in [0..n], n in [0..10]]; // G. C. Greubel, Nov 18 2019
    
  • Maple
    seq(seq( add(binomial(n,j)*2^(n-j), j=k..n), k=0..n), n=0..10); # G. C. Greubel, Nov 18 2019
  • Mathematica
    Flatten[Table[Sum[Binomial[n, k+m]*2^(n-k-m), {m, 0, n}], {n, 0, 10}, {k, 0, n}]]
  • PARI
    T(n,k) = sum(j=k,n, binomial(n,j)*2^(n-j)); \\ G. C. Greubel, Nov 18 2019
    
  • Sage
    [[sum(binomial(n,j)*2^(n-j) for j in (0..n)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Nov 18 2019
    

Formula

T(n, k) = Sum_{j=0..n} binomial(n, k+j)*2^(n-k-j).
O.g.f. (by columns): x^k /((1-3*x)*(1-2*x)^k). - Frank Ruskey and class
T(n,k) = Sum_{j=k..n} binomial(n,j)*2^(n-j). - Ross La Haye, May 02 2006
Binomial transform (by columns) of A055248.

Extensions

More terms from Ross La Haye, Dec 31 2006

A120434 Triangle read by rows: counts permutations by number of big descents.

Original entry on oeis.org

2, 4, 2, 8, 14, 2, 16, 66, 36, 2, 32, 262, 342, 82, 2, 64, 946, 2416, 1436, 176, 2, 128, 3222, 14394, 16844, 5364, 366, 2, 256, 10562, 76908, 156190, 99560, 18654, 748, 2, 512, 33734, 381566, 1242398, 1378310, 528818, 61946, 1514, 2
Offset: 2

Author

David Callan, Jul 14 2006, Sep 25 2006

Keywords

Comments

A big descent in a permutation (x_1,x_2,...,x_n) is a position i such that x_i - x_(i+1) >= 2. T(n,k) is the number of permutations on [n] with k big descents. The mean number of big descents in permutations on [n] is (n-1)(n-2)/(2n). For S(n,k):=number of permutations on [n] with k small descents, that is, indices i such that x_i - x_(i+1) = 1, the gf Sum_{n>=0,k>=0} S(n+1,k) x^n/n! y^k is 1/(E^(x(1 - y))*(1 - x)^2).
T(n,k) is also the number of recursive trees with n+1 vertices and k+2 leaves. (A recursive tree on n vertices is a rooted tree with the vertices labeled 1, 2, ... n, such that the root is labeled 1 and every path starting at the root is increasing with respect to the labels.) - Taral Guldahl Seierstad (seiersta(AT)informatik.hu-berlin.de), Oct 12 2006
In the comment by T. G. Seierstad, the term "leaf" means "vertex incident with exactly one edge." Thus if the root has only one child, the root is a leaf. T(n,k) is the number of trees rooted at 0 on vertex set {0,1,2,...,n} that contain k+1 leaves (here a leaf is a vertex with no children) and such that, for i = 0,1,...,n-1, there is exactly one vertex larger than i incident with i. For example, T(3,0) = 4 counts {0->1->2->3}, {0->1->3->2}, {0->2->3->1}, {0->3->2->1} and T(3,1) = 2 counts {0->2->1,2->3}, {0->3->1,3->2} (the arrows indicate edges directed away from the root). - David Callan, Feb 01 2007
From Peter Bala, Sep 19 2008: (Start)
If we divide the entries of this array by 2 and then read the rows in reverse order we obtain the array of 2-Eulerian numbers A144696.
Two equivalent interpretations of this array are:
A) Define a permutation p in the symmetric group S_n to have an r-excedance at position i, 1 <= i <= n-1, if p(i) >= i+r. This array gives the number of permutations in the symmetric group S_n having k 2-excedances (see the last chapter of [Riordan]). For example, in the symmetric group S_3, the two permutations (3,1,2) and (3,2,1) have a single 2-excedance, while the remaining four permutations have no 2-excedances. Hence T(3,0) = 4 and T(3,1) = 2. The triangle of Eulerian numbers A008292 enumerates permutations by 1-excedances (with an offset of 1 in the column indexing).
B) T(n,k) gives the number of permutations in the group S_(n+1) starting with a 2 and having k+1 descents [Conger]. For example, in the symmetric group S_4, the permutations (2,1,4,3) and (2,4,3,1) start with a 2 and have two descents so T(3,1) = 2, while the four permutations (2,1,3,4), (2,3,1,4), (2,3,4,1) and (2,4,1,3) start with a 2 and have a single descent giving T(3,0) = 4. (End)
Appears to be mirror image of A199335. - Dale Gerdemann, Apr 18 2015
T(n,k) gives the number of permutations in the group S_n with k+1 special descents, where a special descent is defined as either a normal descent or if the permutation starts with 1. For example, in the symmetric group S_3, the permutations (1,3,2) and (3,2,1) have 2 special descents so T(3,1)=2, while the permutations (1,2,3), (2,1,3), (2,3,1), and (3,1,2) have one special descent, giving T(3,0)=4. - Tanya Khovanova and Rich Wang, Jan 31 2023

Examples

			Table begins
  n\ k|  0     1     2     3     4     5
  ----+---------------------------------
    2 |  2
    3 |  4     2
    4 |  8    14     2
    5 | 16    66    36     2
    6 | 32   262   342    82     2
    7 | 64   946  2416  1436   176     2
The permutation (5,1,4,2,3) has big descents at i=1 and i=3. T(3,1)=2 counts (3,1,2) and (2,3,1).
		

References

  • J. Riordan, An introduction to combinatorial analysis, J. Wiley, 1958.

Crossrefs

Column k=1 is twice A066810. See A010027 for small descents.

Programs

  • Maple
    U := proc(n,k) option remember: if k < 0 or k > n then 0 elif n = 0 then 1 else (k+2)*U(n-1, k) + (n-k)*U(n-1, k-1) fi end: T_row := n -> seq(U(n-1,k), k = 0..n-2): for n from 2 to 7 do T_row(n) od; # Peter Luschny, Oct 15 2017
  • Mathematica
    a[0,0] = 1; a[1,0] = 1; a[n_,k_]/;n<=1 && k>=1 := 0 a[n_,k_]/;k>=n-1>=1 || k<0 := 0 a[n_,k_]/;0<=k<=n-2 := a[n,k] = (k+1)Sum[a[i,k],{i,0,n-1}] + Sum[(i-k)a[i,k-1],{i,n-1}] Table[a[n,k],{n,0,10},{k,0, Max[0,n-2]}]

Formula

T(n,k) = Sum_{j=0..k} (-1)^j*(k + 1 - j)*binomial(n + 1, j)*(k + 2 - j)^(n - 1). The generating function F(x,y) := Sum_{n>=0,k>=0} T(n+2,k)*(x^n/n!)*y^k is given by F(x,y) = 2E^(2x(1-y)) G(x,y)^3 where G(x,y) := (1 - y)/(1 - E^(x(1 - y)) y) is 1 + Sum_{n>=1,k>=1} a(n,k)*(x^n/n!)*y^k and a(n,k) are the Eulerian numbers A008292. Note the offsets S(n+1) and T(n+2) in the definition of their g.f.s. A recurrence is given in the Mathematica code below.
From Peter Bala, Sep 19 2008: (Start)
The e.g.f. has the form (A(x,t))^2 = 1 + 2*t + (4 + 2*x)*t^2/2! + (8 + 14*x + 2*x^2)*t^3/3! + ..., where A(x,t) = (1 - x)/(exp(t*x - t) - x) = 1 + t + (1 + x)*t^2/2! + (1 + 4x + x^2)*t^3/3! + ... is the e.g.f. for the Eulerian numbers A008292.
Define the row polynomials R(n,x) := Sum_{k=0..n-2} T(n,k)*x^k. Then x^2*R(n,x) = A(n,x) + (x-1)*A(n-1,x), where the A(n,x) are the Eulerian polynomials. For example, when n = 4, R(4,x) = (1/x^2)*{(x + 11*x^2 + 11*x^3 + x^4) + (x-1)*(x + 4*x^2 + x^3)} = 8 + 14*x + 2*x^2.
The row polynomials are also related to the Eulerian polynomials via differentiation. For example, d/dx[(1 + 4*x + x^2)/(1-x)^4] = (8 + 14*x + 2*x^2)/(1-x)^5 and d/dx[(1 + 11*x + 11*x^2 + x^3)/(1-x)^5] = (16 + 66*x + 36*x^2 + 2*x^3)/(1-x)^6.
Let p be a permutation in the symmetric group S_n. Let cyc(p) denote the number of cycles of p. Let exc(p) denote the number of excedances of p. Then R(n+1,x) = Sum_{p in S_n} 2^cyc(p)*x^exc(p) [Foata & Schutzenberger p. 40]. For example, for n = 2, the identity permutation (1,2) has 2 cycles and no excedances and so contributes 4 to the sum, while the transposition (2,1) has a single cycle and one excedance and contributes 2*x to the sum; hence R(3,x) = 4 + 2*x.
R(n+1,x) = Sum_{k = 1..n} (k+1)!*Stirling2(n,k)*(x-1)^(n-k) for n = 1,2,... (see [Riordan p. 214]).
Worpitzky type identities:
Sum_{k = 0..n-2} T(n,k)*binomial(x+k,n) = x*(x-1)^(n-1);
Sum_{k = 0..n-2} T(n,n-2-k)*binomial(x+k,n) = (x-1)*x^(n-1). (End)
If enumerated like the Eulerian numbers by Knuth (A173018) with 1 prepended, i.e., as 1; 2, 0; 4, 2, 0; 8, 14, 2, 0; ... with 0 <= k <= n the numbers have the recurrence (k+2)*U(n-1, k) + (n-k)*U(n-1, k-1). - Peter Luschny, Oct 15 2017

A086443 Expansion of x^2/((1-4*x)*(1-3*x)^2).

Original entry on oeis.org

0, 0, 1, 10, 67, 376, 1909, 9094, 41479, 183412, 792697, 3367618, 14120011, 58605808, 241331965, 987648382, 4022338063, 16318934764, 66007533313, 266354656186, 1072779614035, 4314363685480, 17330677214341, 69552836627830
Offset: 0

Author

Paul Barry, Jul 21 2003

Keywords

Comments

Second binomial transform of A000295. Binomial transform of A066810 (with two leading zeros).
a(n) is the number of n-digit sequences on 4 symbols that have at least two 0's. For ternary sequences see A066810 and for binary sequences see A000295. - Enrique Navarrete, Apr 15 2022

Examples

			a(4)=67 since the sequences are the 12 permutations of the form 1000, 2000, 3000; the 18 permutations of the form 1100, 2200, 3300; the 36 permutations of the form 1200, 1300, 2300; and 0000. - _Enrique Navarrete_, Apr 15 2022
		

Crossrefs

Formula

a(n) = 4^n - 3^n - n*3^(n-1).
E.g.f.: exp(3*x)*(exp(x)-x-1). - Enrique Navarrete, Apr 15 2022

A110291 Riordan array (1/(1-x), x*(1+2*x)).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 3, 5, 1, 1, 3, 9, 7, 1, 1, 3, 9, 19, 9, 1, 1, 3, 9, 27, 33, 11, 1, 1, 3, 9, 27, 65, 51, 13, 1, 1, 3, 9, 27, 81, 131, 73, 15, 1, 1, 3, 9, 27, 81, 211, 233, 99, 17, 1, 1, 3, 9, 27, 81, 243, 473, 379, 129, 19, 1, 1, 3, 9, 27, 81, 243, 665, 939, 577, 163, 21, 1
Offset: 0

Author

Paul Barry, Jul 18 2005

Keywords

Comments

Inverse is A110292.

Examples

			Rows begin
  1;
  1, 1;
  1, 3, 1;
  1, 3, 5,  1;
  1, 3, 9,  7,  1;
  1, 3, 9, 19,  9,   1;
  1, 3, 9, 27, 33,  11,  1;
  1, 3, 9, 27, 65,  51, 13,  1;
  1, 3, 9, 27, 81, 131, 73, 15, 1;
		

Crossrefs

Cf. A000975 (row sums), A052947 (diagonal sums).

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30);
    F:= func< k | Coefficients(R!( x^k*(1+2*x)^k/(1-x) )) >;
    A110291:= func< n,k | F(k)[n-k+1] >;
    [A110291(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Jan 05 2023
    
  • Mathematica
    F[k_]:= CoefficientList[Series[x^k*(1+2*x)^k/(1-x), {x,0,40}], x];
    A110291[n_, k_]:= F[k][[n+1]];
    Table[A110291[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jan 05 2023 *)
  • SageMath
    def p(k,x): return x^k*(1+2*x)^k/(1-x)
    def A110291(n,k): return ( p(k,x) ).series(x, 30).list()[n]
    flatten([[A110291(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jan 05 2023

Formula

T(n, k) = [x^n]( x^k*(1+2*x)^k/(1-x) ).
Sum_{k=0..n} T(n, k) = A000975(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A052947(n+1).
From G. C. Greubel, Jan 05 2023: (Start)
T(n, 0) = T(n, n) = 1.
T(n, n-1) = A005408(n-1).
T(2*n, n) = T(2*n+1, n) = A000244(n).
T(2*n, n+1) = A066810(n+1).
T(2*n, n-1) = A000244(n-1).
T(2*n+1, n+1) = A001047(n+1).
Sum_{k=0..n} (-1)^k * T(n, k) = A077912(n).
Sum_{k=0..n} 2^k * T(n, k) = A014335(n+2).
Sum_{k=0..n} 3^k * T(n, k) = A180146(n).
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k, k) = A077890(n). (End)

Extensions

a(30) and following corrected by Georg Fischer, Oct 11 2022

A089249 Triangular array read by rows illustrating the connection between A000522 and A008292.

Original entry on oeis.org

1, 3, 4, 6, 16, 11, 10, 40, 55, 26, 15, 80, 165, 156, 57, 21, 140, 385, 546, 399, 120
Offset: 1

Author

Alford Arnold, Dec 11 2003

Keywords

Comments

The general case corresponding to other diagonals of A046802 can be derived from A046802(m,n) = Sum C(m-1,n-1) * A008292(m-r,n-1).

Examples

			The fifth row of the array is 15 80 165 156 57 resulting from A089249 (1 4 11 26 57 ) times ( 15 20 15 6 1)
		

Crossrefs

Row sums = the third diagonal of A046802.
Showing 1-10 of 13 results. Next