cp's OEIS Frontend

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

Previous Showing 21-30 of 218 results. Next

A145876 Triangle read by rows: T(n,k) is the number of permutations of [n] having k-1 alternating descents (1<=k<=n). The index i is an alternating descent of a permutation p if either i is odd and p(i)>p(i+1), or i is even and p(i)

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 5, 7, 7, 5, 16, 26, 36, 26, 16, 61, 117, 182, 182, 117, 61, 272, 594, 1056, 1196, 1056, 594, 272, 1385, 3407, 6669, 8699, 8699, 6669, 3407, 1385, 7936, 21682, 46348, 67054, 76840, 67054, 46348, 21682, 7936, 50521, 151853, 350240, 556952, 704834, 704834, 556952, 350240, 151853, 50521
Offset: 1

Views

Author

Emeric Deutsch, Oct 22 2008

Keywords

Comments

Row sums are the factorials (A000142).
T(n,1) = T(n,n) = A000111(n) (Euler or up-down numbers).
Sum(k*T(n,k), k=1..n) = (n+1)!/2 = A001710(n+1).
From Peter Bala, Jun 11 2011: (Start)
Koutras has defined generalized Eulerian numbers associated with a sequence of polynomials - the ordinary Eulerian numbers A008292 being associated with the sequence of monomials x^n. The present array is the triangle of Eulerian numbers associated with the sequence of zigzag polynomials Z(n,x) defined in A147309.
See A109449, A147315 and A185424 for the respective analogs of the Pascal triangle, the Stirling numbers of the second kind and the Bernoulli numbers, associated with the sequence of zigzag polynomials. (End)
From Vaclav Kotesovec, Apr 29 2018: (Start)
In general, for fixed k>=1, T(n,k) ~ (4-Pi)^(k-1) * 2^(n+2) * n^(k-1) * n! / ((k-1)! * Pi^(n + k)).
Equivalently, for fixed k>=1, T(n,k) ~ (4-Pi)^(k-1) * 2^(n + 5/2) * n^(n + k - 1/2) / ((k-1)! * Pi^(n + k - 1/2) * exp(n)). (End)

Examples

			T(4,3) = 7 because we have 1243, 4123, 1342, 3124, 2134, 2341 and 4321. For example, for p=1342 the alternating descent is {2,3}; indeed, 2 is even and p(2)=3 < p(3)=4, while 3 is odd and p(3)=4 > p(4)=2.
Triangle starts:
     1;
     1,    1;
     2,    2,    2;
     5,    7,    7,    5;
    16,   26,   36,   26,   16;
    61,  117,  182,  182,  117,   61;
   272,  594, 1056, 1196, 1056,  594,  272;
  1385, 3407, 6669, 8699, 8699, 6669, 3407, 1385;
  ...
		

Crossrefs

Cf. A302903 (T(2n+1,n+1)), A302904 (T(2n,n)), A302905 (T(n,ceiling(n/2))).

Programs

  • Maple
    F:=t*(1-tan(u*(t-1))-sec(u*(t-1)))/(tan(u*(t-1))+sec(u*(t-1))-t): Fser:= simplify(series(F,u=0,12)): for n from 0 to 10 do P[n]:=sort(expand(factorial(n)*coeff(Fser,u,n))) end do: for n to 10 do seq(coeff(P[n],t,j),j=1..n) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(u, o) option remember; expand(`if`(u+o=0, 1,
           add(b(o+j-1, u-j)*x, j=1..u)+
           add(b(o-j, u-1+j),   j=1..o)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n, 0)):
    seq(T(n), n=1..12);  # Alois P. Heinz, Nov 18 2013, Apr 15 2018
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, 1, Expand[
         Sum[b[u+j-1, o-j, !t]*If[t, 1, x], {j, 1, o}] +
         Sum[b[u-j, o+j-1, !t]*If[t, x, 1], {j, 1, u}]]];
    T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n-1}]][b[0, n, True]];
    Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Feb 19 2015, after Alois P. Heinz *)

Formula

E.g.f.: F(t,u) = t*(1-tan(u*(t-1))-sec(u*(t-1)))/(tan(u*(t-1))+sec(u*(t-1))-t).
From Peter Bala, Jun 11 2011: (Start)
T(n,k) = Sum_{j = 0..k} (-1)^(k-j)*binomial(n+1,k-j)*Z(n,j), where Z(n,x) are the zigzag polynomials defined in A147309.
Let M denote the triangular array A109449. The first column of the array (I-x*M)^-1 is a sequence of rational functions in x whose numerator polynomials are the row polynomials of the present array.
(End)
From Vladimir Shevelev, Jul 01 2011: (Start)
a(2^(2*n-1)-2^(n-1)+1) == 1 (mod 2^n).
If n is odd prime, then a(2*n^2-n+1) == 1 (mod 2*n) and a((n^2-n+2)/2) == (-1)^((n-1)/2).
(End)

A242519 Number of cyclic arrangements of S={1,2,...,n} such that the difference between any two neighbors is 2^k for some k=0,1,2,...

Original entry on oeis.org

0, 1, 1, 1, 4, 8, 14, 32, 142, 426, 1204, 3747, 9374, 26306, 77700, 219877, 1169656, 4736264, 17360564, 69631372, 242754286, 891384309, 3412857926, 12836957200, 42721475348, 152125749587, 549831594988
Offset: 1

Views

Author

Stanislav Sykora, May 27 2014

Keywords

Comments

a(n)=NPC(n;S;P) is the count of all neighbor-property cycles for a specific set S of n elements and a specific pair-property P. Evaluating this sequence for n>=3 is equivalent to counting Hamiltonian cycles in a pair-property graph with n vertices and is often quite hard. For more details, see the link.

Examples

			The four such cycles of length 5 are:
C_1={1,2,3,4,5}, C_2={1,2,4,3,5}, C_3={1,2,4,5,3}, C_4={1,3,2,4,5}.
The first and the last of the 426 such cycles of length 10 are:
C_1={1,2,3,4,5,6,7,8,10,9}, C_426={1,5,7,8,6,4,3,2,10,9}.
		

Crossrefs

Programs

  • Mathematica
    A242519[n_] := Count[Map[lpf, Map[j1f, Permutations[Range[2, n]]]], 0]/2;
    j1f[x_] := Join[{1}, x, {1}];
    lpf[x_] := Length[Select[Abs[Differences[x]], ! MemberQ[t, #] &]];
    t = Table[2^k, {k, 0, 10}];
    Join[{0, 1}, Table[A242519[n], {n, 3, 10}]]
    (* OR, a less simple, but more efficient implementation. *)
    A242519[n_, perm_, remain_] := Module[{opt, lr, i, new},
       If[remain == {},
         If[MemberQ[t, Abs[First[perm] - Last[perm]]], ct++];
         Return[ct],
         opt = remain; lr = Length[remain];
         For[i = 1, i <= lr, i++,
          new = First[opt]; opt = Rest[opt];
          If[! MemberQ[t, Abs[Last[perm] - new]], Continue[]];
          A242519[n, Join[perm, {new}],
           Complement[Range[2, n], perm, {new}]];
          ];
         Return[ct];
         ];
       ];
    t = Table[2^k, {k, 0, 10}];
    Join[{0, 1}, Table[ct = 0; A242519[n, {1}, Range[2, n]]/2, {n, 3, 12}]] (* Robert Price, Oct 22 2018 *)

Formula

For any S and any P, and for n>=3, NPC(n;S;P)<=A001710(n-1).

Extensions

a(22)-a(27) from Hiroaki Yamanouchi, Aug 29 2014

A049398 a(n) = (n+9)!/9!.

Original entry on oeis.org

1, 10, 110, 1320, 17160, 240240, 3603600, 57657600, 980179200, 17643225600, 335221286400, 6704425728000, 140792940288000, 3097444686336000, 71241227785728000, 1709789466857472000, 42744736671436800000, 1111363153457356800000, 30006805143348633600000
Offset: 0

Views

Author

Keywords

Comments

The p=9 member of the p-family of sequences {(n+p-1)!/p!}, n >= 1.
The asymptotic expansion of the higher order exponential integral E(x,m=1,n=10) ~ exp(-x)/x*(1 - 10/x + 110/x^2 - 1320/x^3 + 17160/x^4 - 240240/x^5 + 3603600/x^6 - ...) leads to the sequence given above. See A163931 and A130534 for more information. - Johannes W. Meijer, Oct 20 2009

Crossrefs

Programs

  • Haskell
    a049398 = (flip div 362880) . a000142 . (+ 9)
    -- Reinhard Zumkeller, Aug 31 2014
  • Magma
    [Factorial(n+9)/362880: n in [0..25]]; // Vincenzo Librandi, Jul 20 2011
    
  • Mathematica
    a[n_] := (n + 9)!/9!; Array[a, 20, 0] (* Amiram Eldar, Jan 15 2023 *)
  • PARI
    a(n) = (n+9)!/9!
    

Formula

E.g.f.: 1/(1-x)^10.
a(n) = A173333(n+9,9). - Reinhard Zumkeller, Feb 19 2010
a(n) = A245334(n+9,n) / 10. - Reinhard Zumkeller, Aug 31 2014
From Amiram Eldar, Jan 15 2023: (Start)
Sum_{n>=0} 1/a(n) = 362880*e - 986409.
Sum_{n>=0} (-1)^n/a(n) = 133497 - 362880/e. (End)

A049444 Generalized Stirling number triangle of first kind.

Original entry on oeis.org

1, -2, 1, 6, -5, 1, -24, 26, -9, 1, 120, -154, 71, -14, 1, -720, 1044, -580, 155, -20, 1, 5040, -8028, 5104, -1665, 295, -27, 1, -40320, 69264, -48860, 18424, -4025, 511, -35, 1, 362880, -663696, 509004, -214676, 54649, -8624, 826, -44, 1, -3628800, 6999840, -5753736
Offset: 0

Views

Author

Keywords

Comments

T(n, k) = ^2P_n^k in the notation of the given reference with T(0, 0) := 1. The monic row polynomials s(n,x) := Sum_{m=0..n} T(n, k)*x^k which are s(n, x) = Product_{j=0..n-1} (x-(2+j)), n >= 1 and s(0, x)=1 satisfy s(n, x+y) = Sum_{k=0..n} binomial(n, k)*s(k,x)*S1(n-k, y), with the Stirling1 polynomials S1(n, x) = Sum_{m=1..n} (A008275(n, m)*x^m) and S1(0, x)=1.
In the umbral calculus (see the S. Roman reference given in A048854) the s(n, x) polynomials are called Sheffer polynomials for (exp(2*t), exp(t)-1). This translates to the usual exponential Riordan (Sheffer) notation (1/(1+x)^2, log(1+x)).
See A143491 for the unsigned version of this array and A143494 for the inverse. - Peter Bala, Aug 25 2008
Corresponding to the generalized Stirling number triangle of second kind A137650. - Peter Luschny, Sep 18 2011
Unsigned, reversed rows (cf. A145324, A136124) are the dimensions of the cohomology of a complex manifold with a symmetric group (S_n) action. See p. 17 of the Hyde and Lagarias link. See also the Murri link for an interpretation as the Betti numbers of the moduli space M(0,n) of smooth Riemann surfaces. - Tom Copeland, Dec 09 2016
The row polynomials s(n, x) = (-1)^n*risingfactorial(2 - x, n) are related to the column sequences of the unsigned Abel triangle A137452(n, k), for k >= 2. See the formula there. - Wolfdieter Lang, Nov 21 2022

Examples

			The Triangle  begins:
n\k       0       1        2       3       4      5      6    7   8 9 ...
0:        1
1:       -2       1
2:        6      -5        1
3:      -24      26       -9       1
4:      120    -154       71     -14       1
5      -720    1044     -580     155     -20      1
6:     5040   -8028     5104   -1665     295    -27      1
7:   -40320   69264   -48860   18424   -4025    511    -35    1
8:   362880 -663696   509004 -214676   54649  -8624    826  -44
9: -3628800 6999840 -5753736 2655764 -761166 140889 -16884 1266 -54 1
...  [reformatted by _Wolfdieter Lang_, Nov 21 2022]
		

References

  • Y. Manin, Frobenius Manifolds, Quantum Cohomology and Moduli Spaces, American Math. Soc. Colloquium Publications Vol. 47, 1999. [From Tom Copeland, Jun 29 2008]
  • S. Roman, The Umbral Calculus, Academic Press, 1984 (also Dover Publications, 2005).

Crossrefs

Unsigned column sequences are A000142(n+1), A001705-A001709. Row sums (signed triangle): n!*(-1)^n, row sums (unsigned triangle): A001710(n-2). Cf. A008275 (Stirling1 triangle).

Programs

  • Haskell
    a049444 n k = a049444_tabl !! n !! k
    a049444_row n = a049444_tabl !! n
    a049444_tabl = map fst $ iterate (\(row, i) ->
       (zipWith (-) ([0] ++ row) $ map (* i) (row ++ [0]), i + 1)) ([1], 2)
    -- Reinhard Zumkeller, Mar 11 2014
  • Maple
    A049444_row := proc(n) local k,i;
    add(add(Stirling1(n, n-i), i=0..k)*x^(n-k-1),k=0..n-1);
    seq(coeff(%,x,k),k=1..n-1) end:
    seq(print(A049444_row(n)),n=1..7); # Peter Luschny, Sep 18 2011
    A049444:= (n, k)-> add((-1)^(n-j)*(n-j+1)!*binomial(n, j)*Stirling1(j, k), j=0..n):
    seq(print(seq(A049444(n, k), k=0..n)), n=0..11);  # Mélika Tebni, May 02 2022
  • Mathematica
    t[n_, i_] = Sum[(-1)^k*Binomial[n, k]*(k+1)!*StirlingS1[n-k, i], {k, 0, n-i}]; Flatten[Table[t[n, i], {n, 0, 9}, {i, 0, n}]] [[1 ;; 48]]
    (* Jean-François Alcover, Apr 29 2011, after Milan Janjic *)

Formula

T(n, k) = T(n-1, k-1) - (n+1)*T(n-1, k), n >= k >= 0; T(n, k) = 0, n < k; T(n, -1) = 0, T(0, 0) = 1.
E.g.f. for k-th column of signed triangle: ((log(1+x))^k)/(k!*(1+x)^2).
Triangle (signed) = [-2, -1, -3, -2, -4, -3, -5, -4, -6, -5, ...] DELTA [1, 0, 1, 0, 1, 0, 1, 0, ...]; triangle (unsigned) = [2, 1, 3, 2, 4, 3, 5, 4, 6, 5, ...] DELTA [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, ...], where DELTA is Deléham's operator defined in A084938 (unsigned version in A143491).
E.g.f.: (1 + x)^(y-2). - Vladeta Jovovic, May 17 2004 [For row polynomials s(n, y)]
With P(n, t) = Sum_{j=0..n-2} T(n-2,j) * t^j and P(1, t) = -1 and P(0, t) = 1, then G(x, t) = -1 + exp[P(.,t)*x] = [(1+x)^t - 1 - t^2 * x] / [t(t-1)], whose compositional inverse in x about 0 is given in A074060. G(x, 0) = -log(1+x) and G(x, 1) = (1+x) log(1+x) - 2x. G(x, q^2) occurs in formulas on pages 194-196 of the Manin reference. - Tom Copeland, Feb 17 2008
If we define f(n,i,a) = Sum_{k=0..n-i} binomial(n,k)*Stirling1(n-k,i)*Product_{j=0..k-1} (-a-j), then T(n,i) = f(n,i,2), for n=1,2,...; i=0..n. - Milan Janjic, Dec 21 2008
T(n, k) = Sum_{j=0..n} (-1)^(n-j)*(n-j+1)!*binomial(n, j)*Stirling1(j, k). - Mélika Tebni, May 02 2022
From Wolfdieter Lang, Nov 24 2022: (Start)
Recurrence for row polynomials {s(n, x)}_{n>=0}: s(0, x) = 1, s(n, x) = (x - 2)*exp(-(d/dx)) s(n-1, x), for n >= 1. This is adapted from the general Sheffer result given by S. Roman, Corollary 3.7.2., p. 50.
Recurrence for column sequence {T(n, k)}{n>=k}: T(n, n) = 1, T(n, k) = (n!/(n-k))*Sum{j=k..n-1} (1/j!)*(a(n-1-j) + k*beta(n-1-j))*T(n-1, k), for k >= 0, where alpha = repeat(-2, 2) and beta(n) = [x^n] (d/dx)log(log(x)/x) = (-1)^(n+1)*A002208(n+1)/A002209(n+1), for n >= 0. This is the adapted Boas-Buck recurrence, also given in Rainville, Theorem 50., p. 141, For the references and a comment see A046521. (End)

Extensions

Second formula corrected by Philippe Deléham, Nov 09 2008

A082030 Expansion of e.g.f. exp(x)/(1-x)^3.

Original entry on oeis.org

1, 4, 19, 106, 685, 5056, 42079, 390454, 4000441, 44881660, 547457611, 7215589954, 102211815589, 1548801969976, 25000879886935, 428332610385166, 7763306399014129, 148412806214119924, 2984692721713278211
Offset: 0

Views

Author

Paul Barry, Apr 02 2003

Keywords

Comments

Binomial transform of A001710 (when preceded by 0).
From Peter Bala, Jul 10 2008: (Start)
a(n) is a difference divisibility sequence, that is, the difference a(n) - a(m) is divisible by n - m for all n and m (provided n is not equal to m). See A000522 for further properties of difference divisibility sequences.
Recurrence relation: a(0) = 1, a(1) = 4, a(n) = (n+3)*a(n-1) - (n-1)*a(n-2) for n >= 2. The sequence b(n) := n!*(n^2+n+1) = A001564(n) satisfies the same recurrence with the initial conditions b(0) = 1, b(1) = 3. This leads to the finite continued fraction expansion a(n)/b(n) = 1/(1-1/(4-1/(5-2/(6-...-(n-1)/(n+3))))).
Lim_{n -> infinity} a(n)/b(n) = e/2 = 1/(1-1/(4-1/(5-2/(6-...-n/((n+4)-...))))).
a(n) = n!*(n^2+n+1)*Sum_{k = 0..n} 1/(k!*(k^4+k^2+1)) since the rhs satisfies the above recurrence with the same initial conditions. Hence e = 2*Sum_{k >= 0} 1/(k!*(k^4+k^2+1)).
For sequences satisfying the more general recurrence a(n) = (n+1+r)*a(n-1) - (n-1)*a(n-2), which yield series acceleration formulas for e/r! that involve the Poisson-Charlier polynomials c_r(-n;-1), refer to A000522 (r = 0), A001339 (r=1), A095000 (r=3) and A095177 (r=4). (End)

Crossrefs

Programs

  • Maple
    a := n -> hypergeom([3, -n], [], -1); seq(simplify(a(n)), n=0..18); # Peter Luschny, Sep 20 2014
    seq(simplify(KummerU(-n, -n - 2, 1)), n = 0..20); # Peter Luschny, May 10 2022
  • Mathematica
    a[n_] := a[n] = If[n == 0, 1, (n (n^2 + n + 1) a[n-1] + 1)/(n^2 - n + 1)];
    a /@ Range[0, 18] (* Jean-François Alcover, Oct 16 2019 *)
    With[{nn=20},CoefficientList[Series[Exp[x]/(1-x)^3,{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Aug 07 2022 *)
  • PARI
    {a(n)=n!*polcoeff(exp(x+x*O(x^n))/(1-x)^3,n)} /* Paul D. Hanna, Sep 30 2011 */
    
  • PARI
    {a(n)=sum(k=0,n,binomial(n,k)*(k+2)!/2)} /* Paul D. Hanna, Sep 30 2011 */
    
  • PARI
    {a(n)=sum(k=0,n,binomial(n,k)*(k+1)^(k+1)*(-k)^(n-k))} /* Paul D. Hanna, Sep 30 2011 */
    
  • PARI
    {a(n)=polcoeff(sum(m=0,n,(m+1)^(m+1)*x^m/(1+m*x)^(m+1)+x*O(x^n)),n)} /* Paul D. Hanna, Sep 30 2011 */

Formula

E.g.f.: exp(x)/(1-x)^3.
a(n) = A001340(n)/2.
a(n) = Sum_{k=0..n} A046716(n, k)*3^(n-k). - Philippe Deléham, Jun 12 2004
a(n) = Sum_{k=0..n} binomial(n, k)*(k+2)!/2. - Philippe Deléham, Jun 19 2004
a(n) = Sum_{k=0..n} binomial(n,k)*(k+1)^(k+1)*(-k)^(n-k). - Paul D. Hanna, Sep 30 2011
O.g.f.: Sum_{n>=0} (n+1)^(n+1)*x^n/(1+n*x)^(n+1) = Sum_{n>=0} a(n)*x^n. - Paul D. Hanna, Sep 30 2011
Conjecture: a(n) + (-n-3)*a(n-1) + (n-1)*a(n-2) = 0. - R. J. Mathar, Dec 03 2012
G.f.: (1-x)/(2*x*Q(0)) - 1/2/x, where Q(k) = 1 - x - x*(k+2)/(1 - x*(k+1)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, Apr 22 2013
a(n) = hypergeometric([3, -n], [], -1). - Peter Luschny, Sep 20 2014
First-order recurrence: P(n-1)*a(n) = n*P(n)*a(n-1) + 1 with a(0) = 1, where P(n) = n^2 + n + 1 = A001564(n). - Peter Bala, Jul 26 2021
a(n) = KummerU(-n, -n - 2, 1). - Peter Luschny, May 10 2022

A090802 Triangle read by rows: a(n,k) = number of k-length walks in the Hasse diagram of a Boolean algebra of order n.

Original entry on oeis.org

1, 2, 1, 4, 4, 2, 8, 12, 12, 6, 16, 32, 48, 48, 24, 32, 80, 160, 240, 240, 120, 64, 192, 480, 960, 1440, 1440, 720, 128, 448, 1344, 3360, 6720, 10080, 10080, 5040, 256, 1024, 3584, 10752, 26880, 53760, 80640, 80640, 40320
Offset: 0

Views

Author

Ross La Haye, Feb 10 2004

Keywords

Comments

Row sums = A010842(n); Row sums from column 1 on = A066534(n) = n*A010842(n-1) = A010842(n) - 2^n.
a(n,k) = n! = k! = A000142(n) for n = k; a(n,n-1) = 2*n! = A052849(n) for n > 1; a(n,n-2) = 2*n! = A052849(n) for n > 2; a(n,n-3) = (4/3)*n! = A082569(n) for n > 3; a(n,n-1)/a(2,1) = n!/2! = A001710(n) for n > 1; a(n,n-2)/ a(3,1) = n!/3! = A001715(n) for n > 2; a(n,n-3)/a(4,1) = n!/4! = A001720(n) for n > 3.
a(2k, k) = A052714(k+1). a(2k-1, k) = A034910(k).
a(n,0) = A000079(n); a(n,1) = A001787(n) = row sums of A003506; a(n,2) = A001815(n) = 2!*A001788(n-1); a(n,3) = A052771(n) = 3!*A001789(n); a(n,4) = A052796(n) = 4!*A003472(n); ceiling[a(n,1) / 2] = A057711(n); a(n,5) = 5!*A054849(n).
In a class of n students, the number of committees (of any size) that contain an ordered k-sized subcommittee is a(n,k). - Ross La Haye, Apr 17 2006
Antidiagonal sums [1,2,5,12,30,76,198,528,1448,4080,...] appear to be binomial transform of A000522 interleaved with itself, i.e., 1,1,2,2,5,5,16,16,65,65,... - Ross La Haye, Sep 09 2006
Let P(A) be the power set of an n-element set A. Then a(n,k) = the number of ways to add k elements of A to each element x of P(A) where the k elements are not elements of x and order of addition is important. - Ross La Haye, Nov 19 2007
The derivatives of x^n evaluated at x=2. - T. D. Noe, Apr 21 2011

Examples

			{1};
{2, 1};
{4, 4, 2};
{8, 12, 12, 6};
{16, 32, 48, 48, 24};
{32, 80, 160, 240, 240, 120};
{64, 192, 480, 960, 1440, 1440, 720};
{128, 448, 1344, 3360, 6720, 10080, 10080, 5040};
{256, 1024, 3584, 10752, 26880, 53760, 80640, 80640, 40320}
a(5,3) = 240 because P(5,3) = 60, 2^(5-3) = 4 and 60 * 4 = 240.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[n!/(n-k)! * 2^(n-k), {n, 0, 8}, {k, 0, n}]] (* Ross La Haye, Feb 10 2004 *)

Formula

a(n, k) = 0 for n < k. a(n, k) = k!*C(n, k)*2^(n-k) = P(n, k)*2^(n-k) = (2n)!!/((n-k)!*2^k) = k!*A038207(n, k) = A068424*2^(n-k) = Sum[C(n, m)*P(n-m, k), {m, 0, n-k}] = Sum[C(n, n-m)*P(n-m, k), {m, 0, n-k}] = n!*Sum[1/(m!*(n-m-k)!), {m, 0, n-k}] = k!*Sum[C(n, m)*C(n-m, k), {m, 0, n-k}] = k!*Sum[C(n, n-m)*C(n-m, k), {m, 0, n-k}] = k!*C(n, k)*Sum[C(n-k, n-m-k), {m, 0, n-k}] = k!*C(n, k)*Sum[C(n-k, m), {m, 0, n-k}] for n >= k.
a(n, k) = 0 for n < k. a(n, k) = n*a(n-1, k-1) for n >= k >= 1.
E.g.f. (by columns): exp(2x)*x^k.

Extensions

More terms from Ray Chandler, Feb 26 2004
Entry revised by Ross La Haye, Aug 18 2006

A122843 Triangle read by rows: T(n,k) = the number of ascending runs of length k in the permutations of [n] for k <= n.

Original entry on oeis.org

1, 2, 1, 7, 4, 1, 32, 21, 6, 1, 180, 130, 41, 8, 1, 1200, 930, 312, 67, 10, 1, 9240, 7560, 2646, 602, 99, 12, 1, 80640, 68880, 24864, 5880, 1024, 137, 14, 1, 786240, 695520, 257040, 62496, 11304, 1602, 181, 16, 1, 8467200, 7711200, 2903040, 720720, 133920, 19710, 2360, 231, 18, 1
Offset: 1

Views

Author

David Scambler, Sep 13 2006

Keywords

Comments

Also T(n,k) = number of rising sequences of length k among all permutations. E.g., T(4,3)=6 because in the 24 permutations of n=4, there are 6 rising sequences of length 3: {1,2,3} in {1,2,4,3}, {1,2,3} in {1,4,2,3}, {2,3,4} in {2,1,3,4}, {2,3,4} in {2,3,1,4}, {2,3,4} in {2,3,4,1}, {1,2,3} in {4,1,2,3}. - Harlan J. Brothers, Jul 23 2008
Further comments and formulas from Harlan J. Brothers, Jul 23 2008: (Start)
The n-th row sums to (n+1)!/2, consistent with total count implied by the n-th row in the table of Eulerians, A008292.
Generating this triangle through use of the diagonal polynomials allows one to produce an arbitrary number of "imaginary" columns corresponding to runs of length 0, -1, -2, etc. These columns match A001286, A001048 and the factorial function respectively.
As n->inf, there is a limiting value for the count of each length expressed as a fraction of all rising sequences in the permutations of n. The numerators of the set of limit fractions are given by A028387 and the denominators by A001710.
As a table of diagonals d[i]:
d[1][n] = 1
d[2][n] = 2n
d[3][n] = 3n^2 + 5n - 1
d[4][n] = 4n^3 + 18n^2 + 16n - 6
d[5][n] = 5n^4 + 42n^3 + 106n^2 + 63n - 36
d[6][n] = 6n^5 + 80n^4 + 374n^3 + 688n^2 + 292n - 240
T[n,k] = n!(n(k^2 + k - 1) - k(k^2 - 4) + 1)/(k+2)! + floor(k/n)(1/(k(k+3)+2)), 0 < k <= n. (End)

Examples

			T(3,2) = 4: There are 4 ascending runs of length 2 in the permutations of [3], namely 13 in 132 and in 213, 23 in 231, 12 in 312.
Triangle begins:
    1;
    2,   1;
    7,   4,   1;
   32,  21,   6,   1;
  180, 130,  41,   8,   1;
  ...
		

References

  • C. M. Grinstead and J. L. Snell, Introduction to Probability, American Mathematical Society, 1997, pp.120-131.
  • Donald E. Knuth. The Art of Computer Programming. Vol. 2. Addison-Wesley, Reading, MA, 1998. Seminumerical algorithms, Third edition, Section 3.3.2, p.67.

Crossrefs

Programs

  • Maple
    T:= (n, k)-> `if`(n=k, 1, n!/(k+1)!*(k*(n-k+1)+1
                 -((k+1)*(n-k)+1)/(k+2))):
    seq(seq(T(n,k), k=1..n), n=1..10);  # Alois P. Heinz, Sep 11 2013
  • Mathematica
    Table[n!((n(k(k+1)-1)-k(k-2)(k+2)+1))/(k+2)!+Floor[k/n]1/(k(k+3)+2),{n,1,10},{k,1,n}]//TableForm (* Harlan J. Brothers, Jul 23 2008 *)

Formula

T(n,k) = n!(n(k(k+1)-1) - k(k-2)(k+2) + 1)/(k+2)! for 0 < k < n; T(n,n) = 1; T(n,k) = A122844(n,k) - A122844(n,k+1).
T(n,k) = A008304(n,k) for k > n/2. - Alois P. Heinz, Oct 17 2013

A185105 Number T(n,k) of entries in the k-th cycles of all permutations of {1,2,..,n}; each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements.

Original entry on oeis.org

1, 3, 1, 12, 5, 1, 60, 27, 8, 1, 360, 168, 59, 12, 1, 2520, 1200, 463, 119, 17, 1, 20160, 9720, 3978, 1177, 221, 23, 1, 181440, 88200, 37566, 12217, 2724, 382, 30, 1, 1814400, 887040, 388728, 135302, 34009, 5780, 622, 38, 1, 19958400, 9797760, 4385592, 1606446, 441383, 86029, 11378, 964, 47, 1
Offset: 1

Views

Author

Wouter Meeussen, Dec 26 2012

Keywords

Comments

Row sums are n!*n = A001563(n) (see example).
For fixed k>=1, A185105(n,k) ~ n!*n/2^k. - Vaclav Kotesovec, Apr 25 2017

Examples

			The six permutations of n=3 in ordered cycle form are:
{ {1}, {2}, {3}    }
{ {1}, {2, 3}, {}  }
{ {1, 2}, {3}, {}  }
{ {1, 2, 3}, {}, {}}
{ {1, 3, 2}, {}, {}}
{ {1, 3}, {2}, {}  }
.
The lengths of the cycles in position k=1 sum to 12, those of the cycles in position k=2 sum to 5 and those of the cycles in position k=3 sum to 1.
Triangle begins:
       1;
       3,     1;
      12,     5,     1;
      60,    27,     8,     1;
     360,   168,    59,    12,    1;
    2520,  1200,   463,   119,   17,   1;
   20160,  9720,  3978,  1177,  221,  23,  1;
  181440, 88200, 37566, 12217, 2724, 382, 30, 1;
  ...
		

Crossrefs

Columns k=1-10 give: A001710(n+1), A138772, A159324(n-1)/2 or A285231, A285232, A285233, A285234, A285235, A285236, A285237, A285238.
T(2n,n) gives A285239.

Programs

  • Maple
    b:= proc(n, i) option remember; expand(`if`(n=0, 1,
          add((p-> p+coeff(p, x, 0)*j*x^i)(b(n-j, i+1))*
           binomial(n-1, j-1)*(j-1)!, j=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n, 1)):
    seq(T(n), n=1..12);  # Alois P. Heinz, Apr 15 2017
  • Mathematica
    Table[it = Join[RotateRight /@ ToCycles[#], Table[{}, {k}]] & /@ Permutations[Range[n]]; Tr[Length[Part[#, k]]& /@ it], {n, 7}, {k, n}]
    (* Second program: *)
    b[n_, i_] := b[n, i] = Expand[If[n==0, 1, Sum[Function[p, p + Coefficient[ p, x, 0]*j*x^i][b[n-j, i+1]]*Binomial[n-1, j-1]*(j-1)!, {j, 1, n}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, n}]][b[n, 1]];
    Array[T, 12] // Flatten (* Jean-François Alcover, May 30 2018, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Apr 15 2017

A062139 Coefficient triangle of generalized Laguerre polynomials n!*L(n,2,x) (rising powers of x).

Original entry on oeis.org

1, 3, -1, 12, -8, 1, 60, -60, 15, -1, 360, -480, 180, -24, 1, 2520, -4200, 2100, -420, 35, -1, 20160, -40320, 25200, -6720, 840, -48, 1, 181440, -423360, 317520, -105840, 17640, -1512, 63, -1, 1814400, -4838400, 4233600
Offset: 0

Views

Author

Wolfdieter Lang, Jun 19 2001

Keywords

Comments

The row polynomials s(n,x) := n!*L(n,2,x) = Sum_{m=0..n} a(n,m)*x^m have e.g.f. exp(-z*x/(1-z))/(1-z)^3. They are Sheffer polynomials satisfying the binomial convolution identity s(n,x+y) = Sum_{k=0..n} binomial(n,k)*s(k,x)*p(n-k,y), with polynomials p(n,x) = Sum_{m=1..n} |A008297(n,m)|*(-x)^m, n >= 1 and p(0,x)=1 (for Sheffer polynomials see A048854 for S. Roman reference).
This unsigned matrix is embedded in the matrix for n!*L(n,-2,-x). Introduce 0,0 to each unsigned row and then add 1,-1,1 to the array as the first two rows to generate n!*L(n,-2,-x). - Tom Copeland, Apr 20 2014
The unsigned n-th row reverse polynomial equals the numerator polynomial of the finite continued fraction 1 - x/(1 + (n+1)*x/(1 + n*x/(1 + n*x/(1 + ... + 2*x/(1 + 2*x/(1 + x/(1 + x/(1)))))))). Cf. A089231. The denominator polynomial of the continued fraction is the (n+1)-th row polynomial of A144084. An example is given below. - Peter Bala, Oct 06 2019

Examples

			Triangle begins:
     1;
     3,    -1;
    12,    -8,    1;
    60,   -60,   15,   -1;
   360,  -480,  180,  -24,  1;
  2520, -4200, 2100, -420, 35, -1;
  ...
2!*L(2,2,x) = 12 - 8*x + x^2.
Unsigned row 3 polynomial in reverse form as the numerator of a continued fraction: 1 - x/(1 + 4*x/(1 + 3*x/(1 + 3*x/(1 + 2*x/(1 + 2*x/(1 + x/(1 + x))))))) = (60*x^3 + 60*x^2 + 15*x + 1)/(24*x^4 + 96*x^3 + 72*x^2 + 16*x + 1). - _Peter Bala_, Oct 06 2019
		

Crossrefs

For m=0..5 the (unsigned) columns give A001710, A005990, A005461, A062193-A062195. The row sums (signed) give A062197, the row sums (unsigned) give A052852.

Programs

  • Maple
    with(PolynomialTools):
    p := n -> (n+2)!*hypergeom([-n],[3],x)/2:
    seq(CoefficientList(simplify(p(n)), x), n=0..9); # Peter Luschny, Apr 08 2015
  • Mathematica
    Flatten[Table[((-1)^m)*n!*Binomial[n+2,n-m]/m!,{n,0,8},{m,0,n}]] (* Indranil Ghosh, Feb 24 2017 *)
  • PARI
    tabl(nn) = {for (n=0, nn, for (k=0, n, print1(((-1)^k)*n!*binomial(n+2, n-k)/k!, ", ");); print(););} \\ Michel Marcus, May 06 2014
    
  • PARI
    row(n) = Vecrev(n!*pollaguerre(n, 2)); \\ Michel Marcus, Feb 06 2021
    
  • Python
    import math
    f=math.factorial
    def C(n,r):return f(n)//f(r)//f(n-r)
    i=0
    for n in range(16):
        for m in range(n+1):
            i += 1
            print(i,((-1)**m)*f(n)*C(n+2,n-m)//f(m)) # Indranil Ghosh, Feb 24 2017
    
  • Python
    from functools import cache
    @cache
    def T(n, k):
        if k < 0 or k > n: return 0
        if k == n: return (-1)**n
        return (n + k + 2) * T(n-1, k) - T(n-1, k-1)
    for n in range(7): print([T(n,k) for k in range(n + 1)])
    # Peter Luschny, Mar 25 2024

Formula

T(n, m) = ((-1)^m)*n!*binomial(n+2, n-m)/m!.
E.g.f. for m-th column sequence: ((-x/(1-x))^m)/(m!*(1-x)^3), m >= 0.
n!*L(n,2,x) = (n+2)!*hypergeom([-n],[3],x)/2. - Peter Luschny, Apr 08 2015
From Werner Schulte, Mar 24 2024: (Start)
T(n, k) = (n+k+2) * T(n-1, k) - T(n-1, k-1) with initial values T(0, 0) = 1 and T(i, j) = 0 if j < 0 or j > i.
T = T^(-1), i.e., T is matrix inverse of T. (End)

A265609 Array read by ascending antidiagonals: A(n,k) the rising factorial, also known as Pochhammer symbol, for n >= 0 and k >= 0.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 3, 6, 6, 0, 1, 4, 12, 24, 24, 0, 1, 5, 20, 60, 120, 120, 0, 1, 6, 30, 120, 360, 720, 720, 0, 1, 7, 42, 210, 840, 2520, 5040, 5040, 0, 1, 8, 56, 336, 1680, 6720, 20160, 40320, 40320, 0
Offset: 0

Views

Author

Peter Luschny, Dec 19 2015

Keywords

Comments

The Pochhammer function is defined P(x,n) = x*(x+1)*...*(x+n-1). By convention P(0,0) = 1.
From Antti Karttunen, Dec 19 2015: (Start)
Apart from the initial row of zeros, if we discard the leftmost column and divide the rest of terms A(n,k) with (n+k) [where k is now the once-decremented column index of the new, shifted position] we get the same array back. See the given recursive formula.
When the numbers in array are viewed in factorial base (A007623), certain repeating patterns can be discerned, at least in a few of the topmost rows. See comment in A001710 and arrays A265890, A265892. (End)
A(n,k) is the k-th moment (about 0) of a gamma (Erlang) distribution with shape parameter n and rate parameter 1. - Geoffrey Critzer, Dec 24 2018

Examples

			Square array A(n,k) [where n=row, k=column] is read by ascending antidiagonals as:
A(0,0), A(1,0), A(0,1), A(2,0), A(1,1), A(0,2), A(3,0), A(2,1), A(1,2), A(0,3), ...
Array starts:
n\k [0  1   2    3     4      5        6         7          8]
--------------------------------------------------------------
[0] [1, 0,  0,   0,    0,     0,       0,        0,         0]
[1] [1, 1,  2,   6,   24,   120,     720,     5040,     40320]
[2] [1, 2,  6,  24,  120,   720,    5040,    40320,    362880]
[3] [1, 3, 12,  60,  360,  2520,   20160,   181440,   1814400]
[4] [1, 4, 20, 120,  840,  6720,   60480,   604800,   6652800]
[5] [1, 5, 30, 210, 1680, 15120,  151200,  1663200,  19958400]
[6] [1, 6, 42, 336, 3024, 30240,  332640,  3991680,  51891840]
[7] [1, 7, 56, 504, 5040, 55440,  665280,  8648640, 121080960]
[8] [1, 8, 72, 720, 7920, 95040, 1235520, 17297280, 259459200]
.
Seen as a triangle, T(n, k) = Pochhammer(n - k, k), the first few rows are:
   [0] 1;
   [1] 1, 0;
   [2] 1, 1,  0;
   [3] 1, 2,  2,   0;
   [4] 1, 3,  6,   6,    0;
   [5] 1, 4, 12,  24,   24,    0;
   [6] 1, 5, 20,  60,  120,  120,     0;
   [7] 1, 6, 30, 120,  360,  720,   720,     0;
   [8] 1, 7, 42, 210,  840, 2520,  5040,  5040,     0;
   [9] 1, 8, 56, 336, 1680, 6720, 20160, 40320, 40320, 0.
		

References

  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics, Addison-Wesley, 1994.
  • H. S. Wall, Analytic Theory of Continued Fractions, Chelsea 1973, p. 355.

Crossrefs

Triangle giving terms only up to column k=n: A124320.
Row 0: A000007, row 1: A000142, row 3: A001710 (from k=1 onward, shifted two terms left).
Column 0: A000012, column 1: A001477, column 2: A002378, columns 3-7: A007531, A052762, A052787, A053625, A159083 (shifted 2 .. 6 terms left respectively, i.e. without the extra initial zeros), column 8: A239035.
Row sums of the triangle: A000522.
A(n, n) = A000407(n-1) for n>0.
2^n*A(1/2,n) = A001147(n).
Cf. also A007623, A008279 (falling factorial), A173333, A257505, A265890, A265892.

Programs

  • Maple
    for n from 0 to 8 do seq(pochhammer(n,k), k=0..8) od;
  • Mathematica
    Table[Pochhammer[n, k], {n, 0, 8}, {k, 0, 8}]
  • Sage
    for n in (0..8): print([rising_factorial(n,k) for k in (0..8)])
    
  • Scheme
    (define (A265609 n) (A265609bi (A025581 n) (A002262 n)))
    (define (A265609bi row col) (if (zero? col) 1 (* (+ row col -1) (A265609bi row (- col 1)))))
    ;; Antti Karttunen, Dec 19 2015

Formula

A(n,k) = Gamma(n+k)/Gamma(n) for n > 0 and n^k for n=0.
A(n,k) = Sum_{j=0..k} n^j*S1(k,j), S1(n,k) the Stirling cycle numbers A132393(n,k).
A(n,k) = (k-1)!/(Sum_{j=0..k-1} (-1)^j*binomial(k-1, j)/(j+n)) for n >= 1, k >= 1.
A(n,k) = (n+k-1)*A(n,k-1) for k >= 1, A(n,0) = 1. - Antti Karttunen, Dec 19 2015
E.g.f. for row k: 1/(1-x)^k. - Geoffrey Critzer, Dec 24 2018
A(n, k) = FallingFactorial(n + k - 1, k). - Peter Luschny, Mar 22 2022
G.f. for row n as a continued fraction of Stieltjes type: 1/(1 - n*x/(1 - x/(1 - (n+1)*x/(1 - 2*x/(1 - (n+2)*x/(1 - 3*x/(1 - ... ))))))). See Wall, Chapter XVIII, equation 92.5. Cf. A226513. - Peter Bala, Aug 27 2023
Previous Showing 21-30 of 218 results. Next