cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-16 of 16 results.

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

Views

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

A084416 Triangle read by rows: T(n,k) = Sum_{i=k..n} i!*Stirling2(n,i), n >= 1, 1 <= k <= n.

Original entry on oeis.org

1, 3, 2, 13, 12, 6, 75, 74, 60, 24, 541, 540, 510, 360, 120, 4683, 4682, 4620, 4080, 2520, 720, 47293, 47292, 47166, 45360, 36960, 20160, 5040, 545835, 545834, 545580, 539784, 498960, 372960, 181440, 40320, 7087261, 7087260, 7086750, 7068600, 6882120, 6048000, 4142880, 1814400, 362880
Offset: 1

Views

Author

N. J. A. Sloane, Jun 24 2003

Keywords

Comments

Interpolates between A000670 and factorials.
From Thomas Scheuerle, Apr 25 2022: (Start)
Number of preferential arrangements of n labeled elements when at least k ranks are required.
This sequence starts for k and n with offset 1. If it would start with k = 0, we would observe in column k = 0 an exact copy of column k = 1 with a preceding one at n = 0, k = 0. The difference between 0 ranks and one rank (all in the same rank) is only for n = 0 where k = 0 allows zero-filled ranks as an valid arrangement, too. (End)

Examples

			Triangle begins with T(n,k):
   k=   1,   2,   3,   4,   5
  n=1   1
  n=2   3,   2
  n=3  13,  12,   6
  n=4  75,  74,  60,  24
  n=5 541, 540, 510, 360, 120
...
From _Thomas Scheuerle_, Apr 25 2022: (Start)
If we would add n = 0, k = 0 to the data of this sequence:
   k=   0,   1,   2,
  n=0   1
  n=1   1,   1
  n=2   3,   3,   2
...
T(n, 3) with 3 preceding zeros is: 0,0,0,6,60,510,4620,...
This sequence has the e.g.f.: (e^x-1)^3/(2-e^x).
.
13 arrangements for n = 3 and k = 1 (one rank required):
1,2,3  1,2|3  2,3|1  1,3|2  1|2,3  2|1,3  3|1,2  1|2|3  1|3|2  2|1|3  2|3|1  3|1|2  3|2|1
12 arrangements for n = 3 and k = 2 (two ranks required):
1,2|3  2,3|1  1,3|2  1|2,3  2|1,3  3|1,2  1|2|3  1|3|2  2|1|3  2|3|1  3|1|2  3|2|1
6 arrangements for n = 3 and k = 3 (three ranks required):
1|2|3  1|3|2  2|1|3  2|3|1  3|1|2  3|2|1
. (End)
		

Crossrefs

Mirror image of array in A084417.
Cf. A005649, A069321 (row sums).
A000670(n) (column k = 1), A052875(n) (column k = 2), A102232(n) (column k = 3).

Programs

  • Maple
    T := (n,k)->sum(i!*Stirling2(n,i),i=k..n): seq(seq(T(n,k),k=1..n),n=1..10);
  • PARI
    row(n) = vector(n, k, sum(i=k, n, i!*stirling(n, i, 2))); \\ Michel Marcus, Apr 20 2022

Formula

E.g.f. for m-th column: (exp(x)-1)^m/(2-exp(x)). - Vladeta Jovovic, Sep 14 2003
T(n, k) = Sum_{m = k..n} A090582(n + 1, m + 1).
From Thomas Scheuerle, Apr 25 2022: (Start)
Sum_{k = 0..n} T(n, k) = A005649(n). Column k = 0 is not part of data.
Sum_{k = 1..n} T(n, k) = A069321(n).
T(n, 0) = A000670(n). Column k = 0 is not part of data.
T(n, 1) = A000670(n), for n > 0.
T(n, 2) = A052875(n).
T(n, 3) = A102232(n).
T(n, n) = n! = A000142. (End)

Extensions

More terms from Emeric Deutsch, May 11 2004
More terms from Michel Marcus, Apr 20 2022

A122101 T(n,k) = Sum_{i=0..k} (-1)^(k-i)*binomial(k,i)*A000670(n-k+i).

Original entry on oeis.org

1, 1, 0, 3, 2, 2, 13, 10, 8, 6, 75, 62, 52, 44, 38, 541, 466, 404, 352, 308, 270, 4683, 4142, 3676, 3272, 2920, 2612, 2342, 47293, 42610, 38468, 34792, 31520, 28600, 25988, 23646, 545835, 498542, 455932, 417464, 382672, 351152, 322552, 296564, 272918
Offset: 0

Views

Author

Vladeta Jovovic, Oct 18 2006

Keywords

Examples

			Triangle begins as:
     1;
     1,    0;
     3,    2,    2;
    13,   10,    8,    6;
    75,   62,   52,   44,   38;
   541,  466,  404,  352,  308,  270;
  4683, 4142, 3676, 3272, 2920, 2612, 2342;
  ...
		

Crossrefs

Columns k=0-1 give: A000670, A232472.
Row sums give A089677(n+1).
Main diagonal gives A052841.
T(2n,n) gives A340837.

Programs

  • GAP
    A000670:= function(n)
         return Sum([0..n], i-> Factorial(i)*Stirling2(n,i) ); end;
    T:= function(n,k)
        return Sum([0..k], j-> (-1)^(k-j)*Binomial(k, j)*A000670(n-k+j) ); end;
    Flat(List([0..10], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Oct 02 2019
  • Magma
    A000670:= func< n | &+[Factorial(k)*StirlingSecond(n,k): k in [0..n]] >;
    [(&+[(-1)^(k-j)*Binomial(k,j)*A000670(n-k+j): j in [0..k]]): k in [0..n], n in [0..10]]; // G. C. Greubel, Oct 02 2019
    
  • Maple
    T:= (n, k)-> k!*(n-k)!*coeff(series(coeff(series(exp(-y)/
            (2-exp(x+y)), y, k+1), y, k), x, n-k+1), x, n-k):
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Oct 02 2019
    # second Maple program:
    b:= proc(n) option remember; `if`(n<2, 1,
          add(b(n-j)*binomial(n, j), j=1..n))
        end:
    T:= (n, k)-> add(binomial(k, j)*(-1)^j*b(n-j), j=0..k):
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Oct 02 2019
  • Mathematica
    A000670[n_]:= If[n==0,1,Sum[k! StirlingS2[n, k], {k, n}]]; T[n_, k_]:= Sum[(-1)^(k-j)*Binomial[k, j]*A000670[n-k+j], {j,0,k}]; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 02 2019 *)
  • PARI
    A000670(n) = sum(k=0,n, k!*stirling(n,k,2));
    T(n,k) = sum(j=0,k, (-1)^(k-j)*binomial(k, j)*A000670(n-k+j));
    for(n=0,10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Oct 02 2019
    
  • Sage
    def A000670(n): return sum(factorial(k)*stirling_number2(n,k) for k in (0..n))
    def T(n,k): return sum((-1)^(k-j)*binomial(k, j)*A000670(n-k+j) for j in (0..k))
    [[T(n,k) for k in (0..n)] for n in (0..10)]
    

Formula

Doubly-exponential generating function: Sum_{n, k} a(n-k,k) x^n/n! y^k/k! = exp(-y)/(2-exp(x+y)).

A052876 Expansion of e.g.f. (exp(x)-1)^2/(-2+exp(x))^2.

Original entry on oeis.org

0, 0, 2, 18, 158, 1530, 16622, 201978, 2724878, 40492890, 657944942, 11611834938, 221291822798, 4530383962650, 99179581033262, 2312402554523898, 57211901491595918, 1497211181084718810
Offset: 0

Views

Author

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

Keywords

Comments

Previous name was: A simple grammar.

Crossrefs

Programs

  • Maple
    spec := [S,{B=Set(Z,1 <= card),C=Sequence(B,1 <= card),S=Prod(C,C)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    With[{nn=20},CoefficientList[Series[((Exp[x]-1)^2/(Exp[x]-2)^2),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Jul 19 2018 *)

Formula

E.g.f.: (exp(x)-1)^2/(-2+exp(x))^2.
From Mario Catalani (mario.catalani(AT)unito.it), Dec 22 2003: (Start)
a(n) = A069321(n) - A000670(n).
a(n) = 2*A091106(n)+2. (End)

Extensions

Name changed by Wesley Ivan Hurt, Jun 26 2022

A091106 a(0)=a(1)=-1. For n>1: a(n)=Sum(i!i^2 Stirling2[n-1,i],i=2,..,n-1).

Original entry on oeis.org

-1, -1, 0, 8, 78, 764, 8310, 100988, 1362438, 20246444, 328972470, 5805917468, 110645911398, 2265191981324, 49589790516630, 1156201277261948, 28605950745797958, 748605590542359404, 20661245832389468790, 599820758571599742428, 18272940402442730318118
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Dec 19 2003

Keywords

Programs

  • Mathematica
    CoefficientList[Series[(1/2)((Exp[x]-1)/(Exp[x]-2))^2-Exp[x], {x, 0, 20}], x]

Formula

E.g.f.: (exp(x)-1)^2/(2(exp(x)-2)^2)-exp(x). a(n)=(1/2)(A069321(n)-A000670(n))-1.

A320344 Expansion of e.g.f. log(1 + x)/(1 - log(1 + x))^2.

Original entry on oeis.org

0, 1, 3, 8, 26, 94, 406, 1896, 10440, 59472, 405264, 2673648, 22396128, 160828368, 1704287568, 11993279232, 177349981824, 957018589056, 25766036316288, 33555346603776, 5403108443855616, -28811285794990080, 1643455634670489600, -21001090458387594240, 692074413969784289280
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 22 2019

Keywords

Crossrefs

Programs

  • Maple
    seq(n!*coeff(series(log(1+x)/(1-log(1+x))^2,x=0,25),x,n),n=0..24); # Paolo P. Lava, Jan 29 2019
  • Mathematica
    nmax = 24; CoefficientList[Series[Log[1 + x]/(1 - Log[1 + x])^2, {x, 0, nmax}], x] Range[0, nmax]!
    Table[Sum[StirlingS1[n, k] k k!, {k, 0, n}], {n, 0, 24}]
  • PARI
    my(N=40, x='x+O('x^N)); concat(0, Vec(serlaplace(sum(k=0, N, k*log(1+x)^k)))) \\ Seiichi Manyama, Apr 22 2022

Formula

a(n) = Sum_{k=0..n} Stirling1(n,k)*A001563(k).
E.g.f.: Sum_{k>=0} k * log(1+x)^k. - Seiichi Manyama, Apr 22 2022
Previous Showing 11-16 of 16 results.