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

A349479 Irregular triangle read by rows: T(n,k) = S1(n,k)*2^k, where S1(n,k) is the associated Stirling number of the first kind (cf. A008306) (n >= 0, 0 <= k <= floor(n/2)).

Original entry on oeis.org

1, 0, 0, 2, 0, 4, 0, 12, 12, 0, 48, 80, 0, 240, 520, 120, 0, 1440, 3696, 1680, 0, 10080, 29232, 19040, 1680, 0, 80640, 256896, 211456, 40320, 0, 725760, 2493504, 2429280, 705600, 30240, 0, 7257600, 26547840, 29430720, 11285120, 1108800, 0, 79833600, 307992960, 378595008, 177580480, 27720000, 665280
Offset: 0

Views

Author

Steven Finch, Nov 19 2021

Keywords

Comments

T(n,k) is the number of cycle-colored n-derangements possessing exactly k cycles; two colors are available.

Examples

			Triangle begins:
[0] 1;
[1] 0;
[2] 0,     2;
[3] 0,     4;
[4] 0,    12,     12;
[5] 0,    48,     80;
[6] 0,   240,    520,    120;
[7] 0,  1440,   3696,   1680;
[8] 0, 10080,  29232,  19040,  1680;
[9] 0, 80640, 256896, 211456, 40320;
...
		

Crossrefs

Row sums give A087981.

Programs

  • Maple
    b:= proc(n) option remember; expand(`if`(n=0, 1, add(
          2*x*b(n-j)*binomial(n-1, j-1)*(j-1)!, j=2..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..floor(n/2)))(b(n)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Nov 19 2021
  • Mathematica
    S1[0, 0] = 1; S1[, 0] = 0; S1[n, k_] /; k > Quotient[n, 2] = 0;
    S1[n_, k_] := S1[n, k] = (n-1)*(S1[n-1, k] + S1[n-2, k-1]);
    T[n_, k_] := S1[n, k]*2^k;
    Table[T[n, k], {n, 0, 14}, {k, 0, Quotient[n, 2]}] // Flatten (* Jean-François Alcover, Dec 28 2021 *)

A000166 Subfactorial or rencontres numbers, or derangements: number of permutations of n elements with no fixed points.

Original entry on oeis.org

1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, 32071101049, 481066515734, 7697064251745, 130850092279664, 2355301661033953, 44750731559645106, 895014631192902121, 18795307255050944540, 413496759611120779881, 9510425471055777937262
Offset: 0

Views

Author

Keywords

Comments

Euler (1809) not only gives the first ten or so terms of the sequence, he also proves both recurrences a(n) = (n-1)*(a(n-1) + a(n-2)) and a(n) = n*a(n-1) + (-1)^n.
a(n) is the permanent of the matrix with 0 on the diagonal and 1 elsewhere. - Yuval Dekel, Nov 01 2003
a(n) is the number of desarrangements of length n. A desarrangement of length n is a permutation p of {1,2,...,n} for which the smallest of all the ascents of p (taken to be n if there are no ascents) is even. Example: a(3) = 2 because we have 213 and 312 (smallest ascents at i = 2). See the J. Désarménien link and the Bona reference (p. 118). - Emeric Deutsch, Dec 28 2007
a(n) is the number of deco polyominoes of height n and having in the last column an even number of cells. A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column. - Emeric Deutsch, Dec 28 2007
Attributed to Nicholas Bernoulli in connection with a probability problem that he presented. See Problem #15, p. 494, in "History of Mathematics" by David M. Burton, 6th edition. - Mohammad K. Azarian, Feb 25 2008
a(n) is the number of permutations p of {1,2,...,n} with p(1)!=1 and having no right-to-left minima in consecutive positions. Example a(3) = 2 because we have 231 and 321. - Emeric Deutsch, Mar 12 2008
a(n) is the number of permutations p of {1,2,...,n} with p(n)! = n and having no left to right maxima in consecutive positions. Example a(3) = 2 because we have 312 and 321. - Emeric Deutsch, Mar 12 2008
Number of wedged (n-1)-spheres in the homotopy type of the Boolean complex of the complete graph K_n. - Bridget Tenner, Jun 04 2008
The only prime number in the sequence is 2. - Howard Berman (howard_berman(AT)hotmail.com), Nov 08 2008
From Emeric Deutsch, Apr 02 2009: (Start)
a(n) is the number of permutations of {1,2,...,n} having exactly one small ascent. A small ascent in a permutation (p_1,p_2,...,p_n) is a position i such that p_{i+1} - p_i = 1. (Example: a(3) = 2 because we have 312 and 231; see the Charalambides reference, pp. 176-180.) [See also David, Kendall and Barton, p. 263. - N. J. A. Sloane, Apr 11 2014]
a(n) is the number of permutations of {1,2,...,n} having exactly one small descent. A small descent in a permutation (p_1,p_2,...,p_n) is a position i such that p_i - p_{i+1} = 1. (Example: a(3)=2 because we have 132 and 213.) (End)
For n > 2, a(n) + a(n-1) = A000255(n-1); where A000255 = (1, 1, 3, 11, 53, ...). - Gary W. Adamson, Apr 16 2009
Connection to A002469 (game of mousetrap with n cards): A002469(n) = (n-2)*A000255(n-1) + A000166(n). (Cf. triangle A159610.) - Gary W. Adamson, Apr 17 2009
From Emeric Deutsch, Jul 18 2009: (Start)
a(n) is the sum of the values of the largest fixed points of all non-derangements of length n-1. Example: a(4)=9 because the non-derangements of length 3 are 123, 132, 213, and 321, having largest fixed points 3, 1, 3, and 2, respectively.
a(n) is the number of non-derangements of length n+1 for which the difference between the largest and smallest fixed point is 2. Example: a(3) = 2 because we have 1'43'2 and 32'14'; a(4) = 9 because we have 1'23'54, 1'43'52, 1'53'24, 52'34'1, 52'14'3, 32'54'1, 213'45', 243'15', and 413'25' (the extreme fixed points are marked).
(End)
a(n), n >= 1, is also the number of unordered necklaces with n beads, labeled differently from 1 to n, where each necklace has >= 2 beads. This produces the M2 multinomial formula involving partitions without part 1 given below. Because M2(p) counts the permutations with cycle structure given by partition p, this formula gives the number of permutations without fixed points (no 1-cycles), i.e., the derangements, hence the subfactorials with their recurrence relation and inputs. Each necklace with no beads is assumed to contribute a factor 1 in the counting, hence a(0)=1. This comment derives from a family of recurrences found by Malin Sjodahl for a combinatorial problem for certain quark and gluon diagrams (Feb 27 2010). - Wolfdieter Lang, Jun 01 2010
From Emeric Deutsch, Sep 06 2010: (Start)
a(n) is the number of permutations of {1,2,...,n, n+1} starting with 1 and having no successions. A succession in a permutation (p_1,p_2,...,p_n) is a position i such that p_{i+1} - p_i = 1. Example: a(3)=2 because we have 1324 and 1432.
a(n) is the number of permutations of {1,2,...,n} that do not start with 1 and have no successions. A succession in a permutation (p_1,p_2,...,p_n) is a position i such that p_{i+1} - p_i = 1. Example: a(3)=2 because we have 213 and 321.
(End)
Increasing colored 1-2 trees with choice of two colors for the rightmost branch of nonleave except on the leftmost path, there is no vertex of outdegree one on the leftmost path. - Wenjin Woan, May 23 2011
a(n) is the number of zeros in n-th row of the triangle in A170942, n > 0. - Reinhard Zumkeller, Mar 29 2012
a(n) is the maximal number of totally mixed Nash equilibria in games of n players, each with 2 pure options. - Raimundas Vidunas, Jan 22 2014
Convolution of sequence A135799 with the sequence generated by 1+x^2/(2*x+1). - Thomas Baruchel, Jan 08 2016
The number of interior lattice points of the subpolytope of the n-dimensional permutohedron whose vertices correspond to permutations avoiding 132 and 312. - Robert Davis, Oct 05 2016
Consider n circles of different radii, where each circle is either put inside some bigger circle or contains a smaller circle inside it (no common points are allowed). Then a(n) gives the number of such combinations. - Anton Zakharov, Oct 12 2016
If we partition the permutations of [n+1] in A000240 according to their starting digit, we will get (n+1) equinumerous classes each of size a(n), i.e., A000240(n+1) = (n+1)*a(n), hence a(n) is the size of each class of permutations of [n+1] in A000240. For example, for n = 4 we have 45 = 5*9. - Enrique Navarrete, Jan 10 2017
Call d_n1 the permutations of [n] that have the substring n1 but no substring in {12,23,...,(n-1)n}. If we partition them according to their starting digit, we will get (n-1) equinumerous classes each of size A000166(n-2) (the class starting with the digit 1 is empty since we must have the substring n1). Hence d_n1 = (n-1)*A000166(n-2) and A000166(n-2) is the size of each nonempty class in d_n1. For example, d_71 = 6*44 = 264, so there are 264 permutations in d_71 distributed in 6 nonempty classes of size A000166(5) = 44. (To get permutations in d_n1 recursively from more basic ones see the link "Forbidden Patterns" below.) - Enrique Navarrete, Jan 15 2017
Also the number of maximum matchings and minimum edge covers in the n-crown graph. - Eric W. Weisstein, Jun 14 and Dec 24 2017
The sequence a(n) taken modulo a positive integer k is periodic with exact period dividing k when k is even and dividing 2*k when k is odd. This follows from the congruence a(n+k) = (-1)^k*a(n) (mod k) for all n and k, which in turn is easily proved by induction making use of the recurrence a(n) = n*a(n-1) + (-1)^n. - Peter Bala, Nov 21 2017
a(n) is the number of distinct possible solutions for a directed, no self loop containing graph (not necessarily connected) that has n vertices, and each vertex has an in- and out-degree of exactly 1. - Patrik Holopainen, Sep 18 2018
a(n) is the dimension of the kernel of the random-to-top and random-to-random shuffling operators over a collection of n objects (in a vector space of size n!), as noticed by M. Wachs and V. Reiner. See the Reiner, Saliola and Welker reference below. - Nadia Lafreniere, Jul 18 2019
a(n) is the number of distinct permutations for a Secret Santa gift exchange with n participants. - Patrik Holopainen, Dec 30 2019
a(2*n+1) is even. More generally, a(m*n+1) is divisible by m*n, which follows from a(n+1) = n*(a(n) + a(n-1)) = n*A000255(n-1) for n >= 1. a(2*n) is odd; in fact, a(2*n) == 1 (mod 8). Other divisibility properties include a(6*n) == 1 (mod 24), a(9*n+4) == a(9*n+7) == 0 (mod 9), a(10*n) == 1 (mod 40), a(11*n+5) == 0 (mod 11) and a(13*n+8 ) == 0 (mod 13). - Peter Bala, Apr 05 2022
Conjecture: a(n) with n > 2 is a perfect power only for n = 4 with a(4) = 3^2. This has been verified for n <= 1000. - Zhi-Wei Sun, Jan 09 2025

Examples

			a(2) = 1, a(3) = 2 and a(4) = 9 since the possibilities are {BA}, {BCA, CAB} and {BADC, BCDA, BDAC, CADB, CDAB, CDBA, DABC, DCAB, DCBA}. - _Henry Bottomley_, Jan 17 2001
The Boolean complex of the complete graph K_4 is homotopy equivalent to the wedge of 9 3-spheres.
Necklace problem for n = 6: partitions without part 1 and M2 numbers for n = 6: there are A002865(6) = 4 such partitions, namely (6), (2,4), (3^2) and (2^3) in A-St order with the M2 numbers 5!, 90, 40 and 15, respectively, adding up to 265 = a(6). This corresponds to 1 necklace with 6 beads, two necklaces with 2 and 4 beads respectively, two necklaces with 3 beads each and three necklaces with 2 beads each. - _Wolfdieter Lang_, Jun 01 2010
G.f. = 1 + x^2 + 9*x^3 + 44*x^4 + 265*x^5 + 1854*x^6 + 14833*x^7 + 133496*x^8 + ...
		

References

  • U. Abel, Some new identities for derangement numbers, Fib. Q., 56:4 (2018), 313-318.
  • M. Bona, Combinatorics of Permutations, Chapman & Hall/CRC, Boca Raton, Florida, 2004.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 32.
  • R. A. Brualdi and H. J. Ryser: Combinatorial Matrix Theory, 1992, Section 7.2, p. 202.
  • Ch. A. Charalambides, Enumerative Combinatorics, Chapman & Hall/CRC, Boca Raton, Florida, 2002.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 182.
  • Florence Nightingale David and D. E. Barton, Combinatorial Chance. Hafner, NY, 1962, p. 168.
  • Florence Nightingale David, Maurice George Kendall, and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263, Table 7.5.1, row 1.
  • P. R. de Montmort, On the Game of Thirteen (1713), reprinted in Annotated Readings in the History of Statistics, ed. H. A. David and A. W. F. Edwards, Springer-Verlag, 2001, pp. 25-29.
  • J. M. de Saint-Martin, "Le problème des rencontres" in Quadrature, No. 61, pp. 14-19, 2006, EDP-Sciences Les Ulis (France).
  • H. Doerrie, 100 Great Problems of Elementary Mathematics, Dover, NY, 1965, p. 19.
  • Leonhard Euler, Solution quaestionis curiosae ex doctrina combinationum, Mémoires Académie sciences St. Pétersburg 3 (1809/1810), 57-64; also E738 in his Collected Works, series I, volume 7, pages 435-440.
  • J. M. Gandhi, On logarithmic numbers, Math. Student, 31 (1963), 73-83.
  • A. Hald, A History of Probability and Statistics and Their Applications Before 1750, Wiley, NY, 1990 (Chapter 19).
  • Irving Kaplansky, John Riordan, The problème des ménages. Scripta Math. 12 (1946), 113-124. See Eq(1).
  • Arnold Kaufmann, "Introduction à la combinatorique en vue des applications." Dunod, Paris, 1968. See p. 92.
  • Florian Kerschbaum and Orestis Terzidis, Filtering for Private Collaborative Benchmarking, in Emerging Trends in Information and Communication Security, Lecture Notes in Computer Science, Volume 3995/2006.
  • E. Lozansky and C. Rousseau, Winning Solutions, Springer, 1996; see p. 152.
  • P. A. MacMahon, Combinatory Analysis, 2 vols., Chelsea, NY, 1960, see p. 102.
  • M. S. Petković, "Non-attacking rooks", Famous Puzzles of Great Mathematicians, pp. 265-268, Amer. Math. Soc.(AMS), 2009.
  • V. Reiner, F. Saliola, and V. Welker. Spectra of Symmetrized Shuffling Operators, Memoirs of the American Mathematical Society, vol. 228, Amer. Math. Soc., Providence, RI, 2014, pp. 1-121. See section VI.9.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 65.
  • H. J. Ryser, Combinatorial Mathematics. Mathematical Association of America, Carus Mathematical Monograph 14, 1963, p. 23.
  • T. Simpson, Permutations with unique fixed and reflected points. Ars Combin. 39 (1995), 97-108.
  • 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).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 122.
  • D. B. West, Combinatorial Mathematics, Cambridge, 2021, p. 82.
  • H. S. Wilf, Generatingfunctionology, Academic Press, NY, 1990, p. 147, Eq. 5.2.9 (q=1).

Crossrefs

For the probabilities a(n)/n!, see A053557/A053556 and A103816/A053556.
A diagonal of A008291 and A068106. Column A008290(n,0).
A001120 has a similar recurrence.
For other derangement numbers see also A053871, A033030, A088991, A088992.
Pairwise sums of A002741 and A000757. Differences of A001277.
A diagonal in triangles A008305 and A010027.
a(n)/n! = A053557/A053556 = (N(n, n) of A103361)/(D(n, n) of A103360).
Column k=0 of A086764 and of A334715. Column k=1 of A364068.
Row sums of A216963 and of A323671.

Programs

  • Haskell
    a000166 n = a000166_list !! n
    a000166_list = 1 : 0 : zipWith (*) [1..]
                           (zipWith (+) a000166_list $ tail a000166_list)
    -- Reinhard Zumkeller, Dec 09 2012
    
  • Magma
    I:=[0,1]; [1] cat [n le 2 select I[n] else (n-1)*(Self(n-1)+Self(n-2)): n in [1..30]]; // Vincenzo Librandi, Jan 07 2016
  • Maple
    A000166 := proc(n) option remember; if n<=1 then 1-n else (n-1)*(procname(n-1)+procname(n-2)); fi; end;
    a:=n->n!*sum((-1)^k/k!, k=0..n): seq(a(n), n=0..21); # Zerinvary Lajos, May 17 2007
    ZL1:=[S,{S=Set(Cycle(Z,card>1))},labeled]: seq(count(ZL1,size=n),n=0..21); # Zerinvary Lajos, Sep 26 2007
    with (combstruct):a:=proc(m) [ZL,{ZL=Set(Cycle(Z,card>=m))},labeled]; end: A000166:=a(2):seq(count(A000166,size=n),n=0..21); # Zerinvary Lajos, Oct 02 2007
    Z := (x, m)->m!^2*sum(x^j/((m-j)!^2), j=0..m): R := (x, n, m)->Z(x, m)^n: f := (t, n, m)->sum(coeff(R(x, n, m), x, j)*(t-1)^j*(n*m-j)!, j=0..n*m): seq(f(0, n, 1), n=0..21); # Zerinvary Lajos, Jan 22 2008
    a:=proc(n) if `mod`(n,2)=1 then sum(2*k*factorial(n)/factorial(2*k+1), k=1.. floor((1/2)*n)) else 1+sum(2*k*factorial(n)/factorial(2*k+1), k=1..floor((1/2)*n)-1) end if end proc: seq(a(n),n=0..20); # Emeric Deutsch, Feb 23 2008
    G(x):=2*exp(-x)/(1-x): f[0]:=G(x): for n from 1 to 26 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n]/2,n=0..21); # Zerinvary Lajos, Apr 03 2009
    seq(simplify(KummerU(-n, -n, -1)), n = 0..23); # Peter Luschny, May 10 2022
  • Mathematica
    a[0] = 1; a[n_] := n*a[n - 1] + (-1)^n; a /@ Range[0, 21] (* Robert G. Wilson v *)
    a[0] = 1; a[1] = 0; a[n_] := Round[n!/E] /; n >= 1 (* Michael Taktikos, May 26 2006 *)
    Range[0, 20]! CoefficientList[ Series[ Exp[ -x]/(1 - x), {x, 0, 20}], x]
    dr[{n_,a1_,a2_}]:={n+1,a2,n(a1+a2)}; Transpose[NestList[dr,{0,0,1},30]][[3]] (* Harvey P. Dale, Feb 23 2013 *)
    a[n_] := (-1)^n HypergeometricPFQ[{- n, 1}, {}, 1]; (* Michael Somos, Jun 01 2013 *)
    a[n_] := n! SeriesCoefficient[Exp[-x] /(1 - x), {x, 0, n}]; (* Michael Somos, Jun 01 2013 *)
    Table[Subfactorial[n], {n, 0, 21}] (* Jean-François Alcover, Jan 10 2014 *)
    RecurrenceTable[{a[n] == n*a[n - 1] + (-1)^n, a[0] == 1}, a, {n, 0, 23}] (* Ray Chandler, Jul 30 2015 *)
    Subfactorial[Range[0, 20]] (* Eric W. Weisstein, Dec 31 2017 *)
    nxt[{n_,a_}]:={n+1,a(n+1)+(-1)^(n+1)}; NestList[nxt,{0,1},25][[All,2]] (* Harvey P. Dale, Jun 01 2019 *)
  • Maxima
    s[0]:1$
    s[n]:=n*s[n-1]+(-1)^n$
    makelist(s[n],n,0,12); /* Emanuele Munarini, Mar 01 2011 */
    
  • PARI
    {a(n) = if( n<1, 1, n * a(n-1) + (-1)^n)}; /* Michael Somos, Mar 24 2003 */
    
  • PARI
    {a(n) = n! * polcoeff( exp(-x + x * O(x^n)) / (1 - x), n)}; /* Michael Somos, Mar 24 2003 */
    
  • PARI
    {a(n)=polcoeff(sum(m=0,n,m^m*x^m/(1+(m+1)*x+x*O(x^n))^(m+1)),n)} /* Paul D. Hanna */
    
  • PARI
    A000166=n->n!*sum(k=0,n,(-1)^k/k!) \\ M. F. Hasler, Jan 26 2012
    
  • PARI
    a(n)=if(n,round(n!/exp(1)),1) \\ Charles R Greathouse IV, Jun 17 2012
    
  • PARI
    apply( {A000166(n)=n!\/exp(n>0)}, [0..22]) \\ M. F. Hasler, Nov 09 2024
    
  • Python
    See Hobson link.
    
  • Python
    A000166_list, m, x = [], 1, 1
    for n in range(10*2):
        x, m = x*n + m, -m
        A000166_list.append(x) # Chai Wah Wu, Nov 03 2014
    

Formula

a(n) = A008290(n,0).
a(n) + A003048(n+1) = 2*n!. - D. G. Rogers, Aug 26 2006
a(n) = {(n-1)!/exp(1)}, n > 1, where {x} is the nearest integer function. - Simon Plouffe, March 1993 [This uses offset 1, see below for the version with offset 0. - Charles R Greathouse IV, Jan 25 2012]
a(0) = 1, a(n) = round(n!/e) = floor(n!/e + 1/2) for n > 0.
a(n) = n!*Sum_{k=0..n} (-1)^k/k!.
D-finite with recurrence a(n) = (n-1)*(a(n-1) + a(n-2)), n > 0.
a(n) = n*a(n-1) + (-1)^n.
E.g.f.: exp(-x)/(1-x).
a(n) = Sum_{k=0..n} binomial(n, k)*(-1)^(n-k)*k! = Sum_{k=0..n} (-1)^(n-k)*n!/(n-k)!. - Paul Barry, Aug 26 2004
The e.g.f. y(x) satisfies y' = x*y/(1-x).
Inverse binomial transform of A000142. - Ross La Haye, Sep 21 2004
In Maple notation, representation as n-th moment of a positive function on [-1, infinity]: a(n)= int( x^n*exp(-x-1), x=-1..infinity ), n=0, 1... . a(n) is the Hamburger moment of the function exp(-1-x)*Heaviside(x+1). - Karol A. Penson, Jan 21 2005
a(n) = A001120(n) - n!. - Philippe Deléham, Sep 04 2005
a(n) = Integral_{x=0..oo} (x-1)^n*exp(-x) dx. - Gerald McGarvey, Oct 14 2006
a(n) = Sum_{k=2,4,...} T(n,k), where T(n,k) = A092582(n,k) = k*n!/(k+1)! for 1 <= k < n and T(n,n)=1. - Emeric Deutsch, Feb 23 2008
a(n) = n!/e + (-1)^n*(1/(n+2 - 1/(n+3 - 2/(n+4 - 3/(n+5 - ...))))). Asymptotic result (Ramanujan): (-1)^n*(a(n) - n!/e) ~ 1/n - 2/n^2 + 5/n^3 - 15/n^4 + ..., where the sequence [1,2,5,15,...] is the sequence of Bell numbers A000110. - Peter Bala, Jul 14 2008
From William Vaughn (wvaughn(AT)cvs.rochester.edu), Apr 13 2009: (Start)
a(n) = Integral_{p=0..1} (log(1/(1-p)) - 1)^n dp.
Proof: Using the substitutions 1=log(e) and y = e(1-p) the above integral can be converted to ((-1)^n/e) Integral_{y=0..e} (log(y))^n dy.
From CRC Integral tables we find the antiderivative of (log(y))^n is (-1)^n n! Sum_{k=0..n} (-1)^k y(log(y))^k / k!.
Using the fact that e(log(e))^r = e for any r >= 0 and 0(log(0))^r = 0 for any r >= 0 the integral becomes n! * Sum_{k=0..n} (-1)^k / k!, which is line 9 of the Formula section. (End)
a(n) = exp(-1)*Gamma(n+1,-1) (incomplete Gamma function). - Mark van Hoeij, Nov 11 2009
G.f.: 1/(1-x^2/(1-2x-4x^2/(1-4x-9x^2/(1-6x-16x^2/(1-8x-25x^2/(1-... (continued fraction). - Paul Barry, Nov 27 2009
a(n) = Sum_{p in Pano1(n)} M2(p), n >= 1, with Pano1(n) the set of partitions without part 1, and the multinomial M2 numbers. See the characteristic array for partitions without part 1 given by A145573 in Abramowitz-Stegun (A-S) order, with A002865(n) the total number of such partitions. The M2 numbers are given for each partition in A-St order by the array A036039. - Wolfdieter Lang, Jun 01 2010
a(n) = row sum of A008306(n), n > 1. - Gary Detlefs, Jul 14 2010
a(n) = ((-1)^n)*(n-1)*hypergeom([-n+2, 2], [], 1), n>=1; 1 for n=0. - Wolfdieter Lang, Aug 16 2010
a(n) = (-1)^n * hypergeom([ -n, 1], [], 1), n>=1; 1 for n=0. From the binomial convolution due to the e.g.f. - Wolfdieter Lang, Aug 26 2010
Integral_{x=0..1} x^n*exp(x) = (-1)^n*(a(n)*e - n!).
O.g.f.: Sum_{n>=0} n^n*x^n/(1 + (n+1)*x)^(n+1). - Paul D. Hanna, Oct 06 2011
Abs((a(n) + a(n-1))*e - (A000142(n) + A000142(n-1))) < 2/n. - Seiichi Kirikami, Oct 17 2011
G.f.: hypergeom([1,1],[],x/(x+1))/(x+1). - Mark van Hoeij, Nov 07 2011
From Sergei N. Gladkovskii, Nov 25 2011, Jul 05 2012, Sep 23 2012, Oct 13 2012, Mar 09 2013, Mar 10 2013, Oct 18 2013: (Start)
Continued fractions:
In general, e.g.f. (1+a*x)/exp(b*x) = U(0) with U(k) = 1 + a*x/(1-b/(b-a*(k+1)/U(k+1))). For a=-1, b=-1: exp(-x)/(1-x) = 1/U(0).
E.g.f.: (1-x/(U(0)+x))/(1-x), where U(k) = k+1 - x + (k+1)*x/U(k+1).
E.g.f.: 1/Q(0) where Q(k) = 1 - x/(1 - 1/(1 - (k+1)/Q(k+1))).
G.f.: 1/U(0) where U(k) = 1 + x - x*(k+1)/(1 - x*(k+1)/U(k+1)).
G.f.: Q(0)/(1+x) where Q(k) = 1 + (2*k+1)*x/((1+x)-2*x*(1+x)*(k+1)/(2*x*(k+1)+(1+x)/ Q(k+1))).
G.f.: 1/Q(0) where Q(k) = 1 - 2*k*x - x^2*(k + 1)^2/Q(k+1).
G.f.: T(0) where T(k) = 1 - x^2*(k+1)^2/(x^2*(k+1)^2-(1-2*x*k)*(1-2*x-2*x*k)/T(k+1)). (End)
0 = a(n)*(a(n+1) + a(n+2) - a(n+3)) + a(n+1)*(a(n+1) + 2*a(n+2) - a(n+3)) + a(n+2)*a(n+2) if n>=0. - Michael Somos, Jan 25 2014
a(n) = Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*(k + x)^k*(k + x + 1)^(n-k) = Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*(k + x)^(n-k)*(k + x - 1)^k, for arbitrary x. - Peter Bala, Feb 19 2017
From Peter Luschny, Jun 20 2017: (Start)
a(n) = Sum_{j=0..n} Sum_{k=0..n} binomial(-j-1, -n-1)*abs(Stirling1(j, k)).
a(n) = Sum_{k=0..n} (-1)^(n-k)*Pochhammer(n-k+1, k) (cf. A008279). (End)
a(n) = n! - Sum_{j=0..n-1} binomial(n,j) * a(j). - Alois P. Heinz, Jan 23 2019
Sum_{n>=2} 1/a(n) = A281682. - Amiram Eldar, Nov 09 2020
a(n) = KummerU(-n, -n, -1). - Peter Luschny, May 10 2022
a(n) = (-1)^n*Sum_{k=0..n} Bell(k)*Stirling1(n+1, k+1). - Mélika Tebni, Jul 05 2022

Extensions

Minor edits by M. F. Hasler, Jan 16 2017

A340556 E2(n, k), the second-order Eulerian numbers with E2(0, k) = δ_{0, k}. Triangle read by rows, E2(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 8, 6, 0, 1, 22, 58, 24, 0, 1, 52, 328, 444, 120, 0, 1, 114, 1452, 4400, 3708, 720, 0, 1, 240, 5610, 32120, 58140, 33984, 5040, 0, 1, 494, 19950, 195800, 644020, 785304, 341136, 40320, 0, 1, 1004, 67260, 1062500, 5765500, 12440064, 11026296, 3733920, 362880
Offset: 0

Views

Author

Peter Luschny, Feb 05 2021

Keywords

Comments

The second-order Eulerian number E2(n, k) is the number of Stirling permutations of order n with exactly k descents; here the last index is defined to be a descent. More formally, let Q_n denote the set of permutations of the multiset {1,1,2,2, ..., n,n} in which, for all j, all entries between two occurrences of j are larger than j, then E2(n, k) = card({s in Q_n with des(s) = k}), where des(s) = card({j: s(j) > s(j+1)}) is the number of descents of s.
Also the number of Riordan trapezoidal words of length n with k distinct letters (see Riordan 1976, p. 9).
Also the number of rooted plane trees on n + 1 vertices with k leaves (see Janson 2008, p. 543).
Let b(n) = (1/2)*Sum_{k=0..n-1} (-1)^k*E2(n-1, k+1) / C(2*n-1, k+1). Apparently b(n) = Bernoulli(n, 1) = -n*Zeta(1 - n) = Integral_{x=0..1}F_n(x) for n >= 1. Here F_n(x) are the signed Fubini polynomials (A278075). (See Rzadkowski and Urlinska, example 4.)

Examples

			Triangle starts:
  [0] 1;
  [1] 0, 1;
  [2] 0, 1, 2;
  [3] 0, 1, 8,    6;
  [4] 0, 1, 22,   58,    24;
  [5] 0, 1, 52,   328,   444,     120;
  [6] 0, 1, 114,  1452,  4400,    3708,    720;
  [7] 0, 1, 240,  5610,  32120,   58140,   33984,    5040;
  [8] 0, 1, 494,  19950, 195800,  644020,  785304,   341136,   40320;
  [9] 0, 1, 1004, 67260, 1062500, 5765500, 12440064, 11026296, 3733920, 362880.
To illustrate the generating function for row 3: The expansion of (1 - x)^7*(x*exp(-x) + 16*x^2*exp(-x)^2 + (243*x^3*exp(-x)^3)/2) gives the polynomial x + 8*x^2 + 6*x^3. The coefficients of this polynomial give row 3.
.
Stirling permutations of order 3 with exactly k descents: (When counting the descents one may assume an invisible '0' appended to the permutations.)
  T[3, k=0]:
  T[3, k=1]: 112233;
  T[3, k=2]: 331122; 223311; 221133; 133122; 122331; 122133; 113322; 112332;
  T[3, k=3]: 332211; 331221; 233211; 221331; 133221; 123321.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, 2nd ed. Addison-Wesley, Reading, MA, 1994, p. 270.

Crossrefs

Indexing the second-order Eulerian numbers comes in three flavors: A008517 (following Riordan and Comtet), A201637 (following Graham, Knuth, and Patashnik) and this indexing, extending the definition of Gessel and Stanley. (A008517 is the main entry of the numbers.) The corresponding triangles of the first-order Eulerian numbers are A008292, A173018, and A123125.
Row reversed: A163936 (with offset = 0).
Values: E2poly(n, 1) = A001147(n), E2poly(n, -1) ~ -A001662(n+1), E2poly(n, 2) = A112487(n), 2^n*E2poly(n, 1/2) = A000311(n+1), 2^n*E2poly(n, -1/2) = A341106(n).

Programs

  • Maple
    # Using the recurrence:
    E2 := proc(n, k) option remember;
    if k = 0 and n = 0 then return 1 fi; if n < 0 then return 0 fi;
    E2(n-1, k)*k + E2(n-1, k-1)*(2*n - k) end: seq(seq(E2(n, k), k = 0..n), n = 0..9);
    # Using the row generating function:
    E2egf := n -> (1-x)^(2*n+1)*add(k^(n+k)/k!*(x*exp(-x))^k, k=0..n);
    T := (n, k) -> coeftayl(E2egf(n), x=0, k): seq(print(seq(T(n, j),j=0..n)), n=0..7);
    # Using the built-in function:
    E2 := (n, k) -> `if`(k=0, k^n, combinat:-eulerian2(n, k-1)):
    # Using the compositional inverse (series reversion):
    E2triangle := proc(N) local r, s, C; Order := N + 2;
    s := solve(y = series(x - t*(exp(x) - 1), x), x):
    r := n -> -n!*(t - 1)^(2*n - 1)*coeff(s, y, n); C := [seq(expand(r(n)), n = 1..N)];
    seq(print(seq(coeff(C[n+1], t, k), k = 0..n)), n = 0..N-1) end: E2triangle(10);
  • Mathematica
    T[n_, k_] := T[n, k] = If[k == 0, Boole[n == 0], If[n < 0, 0, k T[n - 1, k] + (2 n - k) T[n - 1, k - 1]]]; Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten
    (* Via row polynomials: *)
    E2poly[n_] := If[n == 0, 1,
      Expand[Simplify[x (x - 1)^(2 n) D[((1 - x)^(1 - 2 n) E2poly[n - 1]), x]]]];
    Table[CoefficientList[E2poly[n], x], {n, 0, 9}] // Flatten
    (* Series reversion *)
    Revert[gf_, len_] := Module[{S = InverseSeries[Series[gf, {x, 0, len + 1}], x]},
    Table[CoefficientList[(n + 1)! (1 - t)^(2 n + 1) Coefficient[S, x, n + 1], t],
    {n, 0, len}] // Flatten]; Revert[x + t - t Exp[x], 6]
  • PARI
    E2poly(n) = if(n == 0, 1, x*(x-1)^(2*n)*deriv((1-x)^(1-2*n)*E2poly(n-1)));
    { for(n = 0, 9, print(Vecrev(E2poly(n)))) }
    
  • PARI
    T(n, k) = sum(j=0, n-k, (-1)^(n-j)*binomial(2*n+1, j)*stirling(2*n-k-j+1, n-k-j+1, 1)); \\ Michel Marcus, Feb 11 2021
    
  • SageMath
    # See also link to notebook.
    @cached_function
    def E2(n, k):
        if n < 0: return 0
        if k == 0: return k^n
        return k * E2(n - 1, k) + (2*n - k) * E2(n - 1, k - 1)  # Peter Luschny, Mar 08 2025

Formula

E2(n, k) = E2(n-1, k)*k + E2(n-1, k-1)*(2*n - k) for n > 0 and 0 <= k <= n, and E2(0, 0) = 1; in all other cases E(n, k) = 0.
E2(n, k) = Sum_{j=0..n-k}(-1)^(n-j)*binomial(2*n+1, j)*Stirling1(2*n-k-j+1, n-k-j+1).
E2(n, k) = Sum_{j=0..k}(-1)^(k-j)*binomial(2*n + 1, k - j)*Stirling2(n + j, j).
Stirling1(x, x - n) = (-1)^n*Sum_{k=0..n} E2(n, k)*binomial(x + k - 1, 2*n).
Stirling2(x, x - n) = Sum_{k=0..n} E2(n, k)*binomial(x + n - k, 2*n).
E2poly(n, x) = Sum_{k=0..n} E2(n, k)*x^k, as row polynomials.
E2poly(n, x) = x*(x-1)^(2*n)*d_{x}((1-x)^(1-2*n)*E2poly(n-1)) for n>=1 and E2poly(0)=1.
E2poly(n, x) = (1 - x)^(2*n + 1)*Sum_{k=0..n}(k^(n + k)/k!)*(x*exp(-x))^k.
W(n, k) = [x^k] (1+x)^n*E2poly(n, x/(1 + x)) are the Ward numbers A269939.
E2(n, k) = [x^k] (1-x)^n*Wpoly(n, x/(1 - x)); Wpoly(n, x) = Sum_{k=0..n}W(n, k)*x^k.
W(n, k) = Sum_{j=0..k} E2(n, j)*binomial(n - j, n - k).
E2(n, k) = Sum_{j=0..k} (-1)^(k-j)*W(n, j)*binomial(n - j, k - j).
The compositional inverse with respect to x of x - t*(exp(x) - 1) (see B. Drake):
T(n, k) = [t^k](n+1)!*(1-t)^(2*n+1)*[x^(n+1)] InverseSeries(x - t*(exp(x)-1), x).
AS1(n, k) = Sum_{j=0..n-k} binomial(j, n-2*k)*E2(n-k, j+1), where AS1(n, k) are the associated Stirling numbers of the first kind (A008306, A106828).
E2(n, k) = Sum_{j=0..n-k+1} (-1)^(n-k-j+1)*AS1(n+j, j)*binomial(n-j, n-k-j+1), for n >= 1.
AS2(n, k) = Sum_{j=0..n-k} binomial(j, n-2*k)*E2(n-k, n-k-j) for n >=1, where AS2(n, k) are the associated Stirling numbers of the second kind (A008299, A137375).
E2(n, k) = Sum_{j=0..k} (-1)^(k-j)*AS2(n + j, j)*binomial(n - j, k - j).

A032188 Number of labeled series-reduced mobiles (circular rooted trees) with n leaves (root has degree 0 or >= 2).

Original entry on oeis.org

1, 1, 5, 41, 469, 6889, 123605, 2620169, 64074901, 1775623081, 54989743445, 1882140936521, 70552399533589, 2874543652787689, 126484802362553045, 5977683917752887689, 301983995802099667861, 16239818347465293071401, 926248570498763547197525, 55847464116157184894240201
Offset: 1

Views

Author

Keywords

Comments

With offset 0, a(n) = number of partitions of the multiset {1,1,2,2,...,n,n} into lists of strictly decreasing lists, called blocks, such that the concatenation of all blocks in a list has the Stirling property: all entries between the two occurrences of i exceed i, 1<=i<=n. For example, with slashes separating blocks, a(2) = 5 counts 1/1/2/2; 1/2/2/1; 2/2/1/1; 1/2/2 1; 2/2 1/1, but not, for instance, 2 1/2/1 because it fails the Stirling test for i=2. - David Callan, Nov 21 2011

Examples

			D^3(1) = (24*x^2-64*x+41)/(2*x-1)^6. Evaluated at x = 0 this gives a(4) = 41.
a(3) = 5: Denote the colors of the vertices by the letters a,b,c, .... The 5 possible increasing plane trees on 3 vertices with vertices of outdegree k coming in 2^(k-1) colors are
.
   1a       1a        1b        1a        1b
   |       /  \      /  \      /  \      /  \
   2a     2    3    2    3    3    2    3    2
   |
   3
		

Crossrefs

Programs

  • Maple
    Order := 20; t1 := solve(series((ln(1-A)+2*A),A)=x,A); A000311 := n->n!*coeff(t1,x,n);
    # With offset 0:
    a := n -> add(combinat:-eulerian2(n,k)*2^k,k=0..n):
    seq(a(n),n=0..19); # Peter Luschny, Jul 09 2015
  • Mathematica
    For[y=x+O[x]^21; oldy=0, y=!=oldy, oldy=y; y=((1-y)Log[1-y]+x*y+y-x)/(2y-1), Null]; Table[n!Coefficient[y, x, n], {n, 1, 20}]
    Rest[CoefficientList[InverseSeries[Series[2*x + Log[1-x],{x,0,20}],x],x] * Range[0,20]!] (* Vaclav Kotesovec, Jan 08 2014 *)
  • Maxima
    a(n):=sum((n+k-1)!*sum(1/(k-j)!*sum((2^l*(-1)^(n+l+1)*stirling1(n-l+j-1,j-l))/(l!*(n-l+j-1)!),l,0,j),j,0,k),k,0,n-1); /* Vladimir Kruchinin, Feb 06 2012 */
    
  • PARI
    N = 66; x = 'x + O('x^N);
    Q(k) = if(k>N, 1,  1 + (k+1)*x - 2*x*(k+1)/Q(k+1) );
    gf = 1/Q(0); Vec(gf) \\ Joerg Arndt, May 01 2013
    
  • PARI
    {my(n=20); Vec(serlaplace(serreverse(2*x+log(1-x + O(x*x^n)))))} \\ Andrew Howroyd, Jan 16 2018

Formula

Doubles (index 2+) under "CIJ" (necklace, indistinct, labeled) transform.
E.g.f. A(x) satisfies log(1-A(x))+2*A(x)-x = 0. - Vladeta Jovovic, Dec 06 2002
With offset 0, second Eulerian transform of the powers of 2 [A000079]. See A001147 for definition of SET. - Ross La Haye, Feb 14 2005
From Peter Bala, Sep 05 2011: (Start)
The generating function A(x) satisfies the autonomous differential equation A'(x) = (1-A)/(1-2*A) with A(0) = 0. Hence the inverse function A^-1(x) = int {t = 0..x} (1-2*t)/(1-t) = 2*x+log(1-x). The expansion of A(x) can be found by inverting the above integral using the method of [Dominici, Theorem 4.1] to arrive at the result a(n) = D^(n-1)(1) evaluated at x = 0, where D denotes the operator g(x) -> d/dx((1-x)/(1-2*x)*g(x)). Compare with A006351.
Applying [Bergeron et al., Theorem 1] to the result x = int {t = 0..A(x)} 1/phi(t), where phi(t) = (1-t)/(1-2*t) = 1+t+2*t^2+4*t^3+8*t^4+... leads to the following combinatorial interpretation for this sequence: a(n) gives the number of plane increasing trees on n vertices where each vertex of outdegree k >= 1 can be colored in 2^(k-1) ways. An example is given below. (End)
The integral from 0 to infinity w.r.t. w of exp(-2w)(1-z*w)^(-1/z) gives an o.g.f. for the series with offset 0. Consequently, a(n)= sum(j=1 to infinity): St1d(n,j)/(2^(n+j-1)) where St1d(n,j) is the j-th element of the n-th diagonal of A132393 with offset=1; e.g., a(3)= 5 = 0/2^3 + 2/2^4 + 11/2^5 + 35/2^6 + 85/2^7 + ... . - Tom Copeland, Sep 15 2011
A signed o.g.f., with Γ(v,x) the incomplete gamma function (see A111999 with u=1), is g(z) = (2/z)^(-(1/z)-1) exp(2/z) Γ((1/z)+1,2/z)/z. - Tom Copeland, Sep 16 2011
With offset 0, a(n) = Sum[T(n+k,k), k=1..n] where T(n,k) are the associated Stirling numbers of the first kind (A008306). For example, a(3) = 41 = 6 + 20 + 15. - David Callan, Nov 21 2011
a(n) = sum(k=0..n-1, (n+k-1)!*sum(j=0..k, 1/(k-j)!*sum(l=0..j, (2^l*(-1)^(n+l+1)*stirling1(n-l+j-1,j-l))/(l!*(n-l+j-1)!)))), n>0. - Vladimir Kruchinin, Feb 06 2012
G.f.: 1/Q(0), where Q(k)= 1 + (k+1)*x - 2*x*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 01 2013
a(n) ~ n^(n-1) / (2 * exp(n) * (1-log(2))^(n-1/2)). - Vaclav Kotesovec, Jan 08 2014
a(n) = A032034(n)/2. - Alois P. Heinz, Jul 04 2018
E.g.f: series reversion of 2*x + log(1-x). - Andrew Howroyd, Sep 19 2018

A136394 Triangle read by rows: T(n,k) is the number of permutations of an n-set having k cycles of size > 1 (0<=k<=floor(n/2)).

Original entry on oeis.org

1, 1, 1, 1, 1, 5, 1, 20, 3, 1, 84, 35, 1, 409, 295, 15, 1, 2365, 2359, 315, 1, 16064, 19670, 4480, 105, 1, 125664, 177078, 56672, 3465, 1, 1112073, 1738326, 703430, 74025, 945, 1, 10976173, 18607446, 8941790, 1346345, 45045, 1, 119481284, 216400569, 118685336
Offset: 0

Views

Author

Vladeta Jovovic, May 03 2008

Keywords

Examples

			Triangle (n,k) begins:
  1;
  1;
  1,    1;
  1,    5;
  1,   20,    3;
  1,   84,   35;
  1,  409,  295,  15;
  1, 2365, 2359, 315;
  ...
		

Crossrefs

Programs

  • Maple
    egf:= proc(k::nonnegint) option remember; x-> exp(x)* ((-x-ln(1-x))^k)/k! end; T:= (n,k)-> coeff(series(egf(k)(x), x=0, n+1), x, n) *n!; seq(seq(T(n,k), k=0..n/2), n=0..30); # Alois P. Heinz, Aug 14 2008
    # second Maple program:
    b:= proc(n) option remember; expand(`if`(n=0, 1, add(b(n-i)*
          `if`(i>1, x, 1)*binomial(n-1, i-1)*(i-1)!, i=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Sep 25 2016
    # third Maple program:
    T:= proc(n, k) option remember; `if`(k<0 or k>2*n, 0,
          `if`(n=0, 1, add(T(n-i, k-`if`(i>1, 1, 0))*
           mul(n-j, j=1..i-1), i=1..n)))
        end:
    seq(seq(T(n,k), k=0..n/2), n=0..15);  # Alois P. Heinz, Jul 16 2017
  • Mathematica
    max = 12; egf = Exp[x*(1-y)]/(1-x)^y; s = Series[egf, {x, 0, max}, {y, 0, max}] // Normal; t[n_, k_] := SeriesCoefficient[s, {x, 0, n}, {y, 0, k}]*n!; t[0, 0] = t[1, 0] = 1; Table[t[n, k], {n, 0, max}, {k, 0, n/2}] // Flatten (* Jean-François Alcover, Jan 28 2014 *)

Formula

E.g.f.: exp(x*(1-y))/(1-x)^y. Binomial transform of triangle A008306. exp(x)*((-x-log(1-x))^k)/k! is e.g.f. of k-th column.
From Alois P. Heinz, Jul 13 2017: (Start)
T(2n,n) = A001147(n).
T(2n+1,n) = A051577(n) = (2*n+3)!!/3 = A001147(n+2)/3. (End)
From Alois P. Heinz, Aug 17 2023: (Start)
Sum_{k=0..floor(n/2)} k * T(n,k) = A001705(n-1) for n>=1.
Sum_{k=0..floor(n/2)} (-1)^k * T(n,k) = A159964(n-1) for n>=1. (End)

A111999 T(n, k) = [x^k] (-1)^n*Sum_{k=0..n} E2(n, n-k)*(1+x)^(n-k) where E2(n, k) are the second-order Eulerian numbers. Triangle read by rows, T(n, k) for n >= 1 and 0 <= k <= n.

Original entry on oeis.org

-1, 3, 2, -15, -20, -6, 105, 210, 130, 24, -945, -2520, -2380, -924, -120, 10395, 34650, 44100, 26432, 7308, 720, -135135, -540540, -866250, -705320, -303660, -64224, -5040, 2027025, 9459450, 18288270, 18858840, 11098780, 3678840, 623376, 40320, -34459425, -183783600, -416215800
Offset: 1

Views

Author

Wolfdieter Lang, Sep 12 2005

Keywords

Comments

Previous name was: A triangle that converts certain binomials into triangle A008276 (diagonals of signed Stirling1 triangle A008275).
Stirling1(n,n-m) = A008275(n,n-m) = Sum_{k=0..m-1}a(m,k)*binomial(n,2*m-k).
The unsigned column sequences start with A001147, A000906 = 2*A000457, 2*|A112000|, 4*|A112001|.
The general results on the convolution of the refined partition polynomials of A133932, with u_1 = 1 and u_n = -t otherwise, can be applied here to obtain results of convolutions of these unsigned polynomials. - Tom Copeland, Sep 20 2016

Examples

			Triangle starts:
  [1]      -1;
  [2]       3,       2;
  [3]     -15,     -20,       -6;
  [4]     105,     210,      130,       24;
  [5]    -945,   -2520,    -2380,     -924,     -120;
  [6]   10395,   34650,    44100,    26432,     7308,     720;
  [7] -135135, -540540,  -866250,  -705320,  -303660,  -64224,  -5040;
  [8] 2027025, 9459450, 18288270, 18858840, 11098780, 3678840, 623376, 40320.
		

References

  • Charles Jordan, Calculus of Finite Differences, Chelsea 1965, p. 152. Table C_{m, nu}.

Crossrefs

Row sums give A032188(m+1)*(-1)^m, m>=1. Unsigned row sums give A032188(m+1), m>=1.
Cf. A008517 (second-order Eulerian triangle) for a similar formula for |Stirling1(n, n-m)|.

Programs

  • Maple
    CoeffList := p -> op(PolynomialTools:-CoefficientList(p, x)):
    E2 := (n, k) -> combinat[eulerian2](n, k):
    poly := n -> (-1)^n*add(E2(n, n-k)*(1+x)^(n-k), k = 0..n):
    seq(CoeffList(poly(n)), n = 1..8); # Peter Luschny, Feb 05 2021
  • Mathematica
    a[m_, k_] := a[m, k] = Which[m < k + 1, 0, And[m == 1, k == 0], -1, k == -1, 0, True, -(2 m - k - 1)*(a[m - 1, k] + a[m - 1, k - 1])]; Table[a[m, k], {m, 9}, {k, 0, m - 1}] // Flatten (* Michael De Vlieger, Sep 23 2016 *)

Formula

a(m, k)=0 if m
From Tom Copeland, May 05 2010 (updated Sep 12 2011): (Start)
The integral from 0 to infinity w.r.t. w of
exp[-w(u+1)] (1+u*z*w)^(1/z) gives a power series, f(u,z), in z for reversed row polynomials in u of A111999, related to an Euler transform of diagonals of A008275.
Let g(u,x) be obtained from f(u,z) by replacing z^n with x^(n+1)/(n+1)!;
g(u,x)= x - u^2 x^2/2! + (2 u^3 + 3 u^4) x^3/3! - (6 u^4 + 20 u^5 + 15 u^6) x^4/4! + ... , an e.g.f. associated to f(u,z).
Then g^(-1)(u,x)=(1+u)*x - log(1+u*x) is the comp. inverse of g(u,x) in x, and, consequently, A133932 is a refinement of A111999.
With h(u,x)= 1/(dg^(-1)/dx)= (1+u*x)/(1+(1+u)*u*x),
g(u,x)=exp[x*h(u,t)d/dt] t, evaluated at t=0. Also, dg(u,x)/dx = h(u,g(u,x)). (End)
From Tom Copeland, May 06 2010: (Start)
For m,k>0, a(m,k) = Sum(j=2 to 2m-k+1): (-1)^(2m-k+1+j) C(2m-k+1,j) St1d(j,m),
where C(n,j) is the binomial coefficient and St1d(j,m) is the (j-m)-th element of the m-th subdiagonal of A008275 for (j-m)>0 and is 0 otherwise,
e.g., St1d(1,1) = 0, St1d(2,1) = -1, St1d(3,1) = -3, St1d(4,1) = -6. (End)
From Tom Copeland, Sep 03 2011 (updated Sep 12 2011): (Start)
The integral from 0 to infinity w.r.t. w of
exp[-w*(u+1)/u] (1+u*z*w)^(1/(u^2*z)) gives a power series, F(u,z), in z for the row polynomials in u of A111999.
Let G(u,x) be obtained from F(u,z) by replacing z^n with x^(n+1)/(n+1)!;
G(u,x) = x - x^2/2! + (3 + 2 u) x^3/3! - (15 + 20 u + 6 u^2) x^4/4! + ... , an e.g.f. for A111999 associated to F(u,z).
G^(-1)(u,x) = ((1+u)*u*x - log(1+u*x))/u^2 is the comp. inverse of G(u,x) in x.
With H(u,x) = 1/(dG^(-1)/dx) = (1+u*x)/(1+(1+u)*x),
G(u,x) = exp[x*H(u,t)d/dt] t, evaluated at t=0. Also, dG(u,x)/dx = H(u,G(u,x)). (End)
From Tom Copeland, Sep 16 2011: (Start)
f(u,z) and F(u,z) are expressible in terms of the incomplete gamma function Γ(v,p)(see Laplace Transforms for Power-law Functions at EqWorld):
With K(p,s) = p^(-s-1) exp(p) Γ(s+1,p),
f(u,z) = K(p,s)/(u*z) with p=(u+1)/(u*z) and s=1/z , and
F(u,z) = K(p,s)/(u*z) with p=(u+1)/(u^2*z) and s=1/(u^2*z). (End)
Diagonals of A008306 are reversed rows of A111999 (see P. Bala). - Tom Copeland, May 08 2012

Extensions

New name from Peter Luschny, Feb 05 2021

A000276 Associated Stirling numbers.

Original entry on oeis.org

3, 20, 130, 924, 7308, 64224, 623376, 6636960, 76998240, 967524480, 13096736640, 190060335360, 2944310342400, 48503818137600, 846795372595200, 15618926924697600, 303517672703078400, 6198400928176128000, 132720966600284160000, 2973385109386137600000
Offset: 4

Keywords

Comments

a(n) is also the number of permutations of n elements, without any fixed point, with exactly two cycles. - Shanzhen Gao, Sep 15 2010

Examples

			a(4) = 3 because we have: (12)(34),(13)(24),(14)(23). - _Geoffrey Critzer_, Nov 03 2012
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 256.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 75.
  • 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).
  • Shanzhen Gao, Permutations with Restricted Structure (in preparation).

Crossrefs

A diagonal of triangle in A008306.

Programs

  • Mathematica
    nn=25;a=Log[1/(1-x)]-x;Drop[Range[0,nn]!CoefficientList[Series[a^2/2,{x,0,nn}],x],4]  (* Geoffrey Critzer, Nov 03 2012 *)
    a[n_] := (n-1)!*(HarmonicNumber[n-2]-1); Table[a[n], {n, 4, 23}] (* Jean-François Alcover, Feb 06 2016, after Gary Detlefs *)
  • PARI
    a(n) = (n-1)!*sum(i=2, n-2, 1/i); \\ Michel Marcus, Feb 06 2016

Formula

a(n) = (n-1)!*Sum_{i=2..n-2} 1/i = (n-1)!*(Psi(n-1)+gamma-1). - Vladeta Jovovic, Aug 19 2003
With alternating signs: Ramanujan polynomials psi_3(n-2, x) evaluated at 1. - Ralf Stephan, Apr 16 2004
E.g.f.: ((x+log(1-x))^2)/2. [Corrected by Vladeta Jovovic, May 03 2008]
a(n) = Sum_{i=2..floor((n-1)/2)} n!/((n-i)*i) + Sum_{i=ceiling(n/2)..floor(n/2)} n!/(2*(n-i)*i). - Shanzhen Gao, Sep 15 2010
a(n) = (n+3)!*(h(n+2)-1), with offset 0, where h(n)=sum(1/k,k=1..n). - Gary Detlefs, Sep 11 2010
Conjecture: (-n+2)*a(n) +(n-1)*(2*n-5)*a(n-1) -(n-1)*(n-2)*(n-3)*a(n-2)=0. - R. J. Mathar, Jul 18 2015
Conjecture: a(n) +2*(-n+2)*a(n-1) +(n^2-6*n+10)*a(n-2) +(n-3)*(n-4)*a(n-3)=0. - R. J. Mathar, Jul 18 2015
a(n) = A000254(n-1) - (n-1)! - (n-2)!. - Anton Zakharov, Sep 24 2016

Extensions

More terms from Christian G. Bower

A106828 Triangle T(n,k) read by rows: associated Stirling numbers of first kind (n >= 0 and 0 <= k <= floor(n/2)).

Original entry on oeis.org

1, 0, 0, 1, 0, 2, 0, 6, 3, 0, 24, 20, 0, 120, 130, 15, 0, 720, 924, 210, 0, 5040, 7308, 2380, 105, 0, 40320, 64224, 26432, 2520, 0, 362880, 623376, 303660, 44100, 945, 0, 3628800, 6636960, 3678840, 705320, 34650, 0, 39916800, 76998240, 47324376, 11098780, 866250, 10395
Offset: 0

Author

N. J. A. Sloane, May 22 2005

Keywords

Comments

Another version of the triangle is in A008306.
A signed version of this triangle is given by the exponential Riordan array [1, log(1+t)-t]. Its row sums are (-1)^n*(1-n). Another version is [1, log(1-t)+t], whose row sums are 1-n. - Paul Barry, May 10 2008

Examples

			Rows 0 though 7 are:
  1;
  0,
  0,   1;
  0,   2,
  0,   6,   3;
  0,  24,  20,
  0, 120, 130,  15;
  0, 720, 924, 210;
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 256.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 75.

Crossrefs

See A008306 for more information.
Cf. A008619 (row lengths), A000166 (row sums).

Programs

  • Haskell
    a106828 n k = a106828_tabf !! n !! k
    a106828_row n = a106828_tabf !! n
    a106828_tabf = map (fst . fst) $ iterate f (([1], [0]), 1) where
       f ((us, vs), x) =
         ((vs, map (* x) $ zipWith (+) ([0] ++ us) (vs ++ [0])), x + 1)
    -- Reinhard Zumkeller, Aug 05 2013
    
  • Maple
    A106828 := (n,k) -> add(binomial(j,n-2*k)*combinat:-eulerian2(n-k,j),j=0..n-k):
    seq(print(seq(A106828(n,k),k=0..iquo(n,2))),n=0..9); # Peter Luschny, Apr 20 2011 (revised Jan 13 2016)
    # Second program, after David Callan in A008306:
    A106828 := proc(n, k) option remember; if k = 0 then k^n elif k = 1 then (n-1)! elif n <= 2*k-1 then 0 else (n-1)*(procname(n-1, k) + procname(n-2, k-1)) fi end: seq((seq(A106828(n, k), k = 0..iquo(n, 2))), n=0..12); # Peter Luschny, Aug 24 2021
  • Mathematica
    Eulerian2[n_, k_] := Eulerian2[n, k] = If[k == 0, 1, If[k == n, 0, Eulerian2[n - 1, k] (k + 1) + Eulerian2[n - 1, k - 1] (2 n - k - 1)]];
    T[n_, k_] := Sum[Binomial[j, n - 2 k] Eulerian2[n - k, j], {j, 0, n - k}];
    Table[T[n, k], {n, 0, 12}, {k, 0, n/2}] (* Jean-François Alcover, Jun 13 2019 *)
  • PARI
    E2(n, m) = sum(k=0, n-m, (-1)^(n+k)*binomial(2*n+1, k)*stirling(2*n-m-k+1, n-m-k+1, 1)); \\ A008517
    T(n, k) = if ((n==0) && (k==0), 1, sum(j=0, n-k, binomial(j, n-2*k)*E2(n-k, j+1))); \\ Michel Marcus, Dec 07 2021
    
  • Python
    from math import factorial
    def A106828(n, k):
        return k**n if k == 0 else factorial(n-1) if k == 1 else 0 if n <= 2*k - 1 else (n - 1)*(A106828(n-1, k) + A106828(n-2, k-1))
    for n in range(14): print([A106828(n, k) for k in range(n//2 + 1)])
    # Mélika Tebni, Dec 07 2021, after second Maple script.
  • Sage
    # uses[bell_transform from A264428]
    # Computes the full triangle 0<=k<=n.
    def A106828_row(n):
        g = lambda k: factorial(k) if k>0 else 0
        s = [g(k) for k in (0..n)]
        return bell_transform(n, s)
    [A106828_row(n) for n in (0..8)] # Peter Luschny, Jan 13 2016
    

Formula

T(n, k) = Sum_{j=0..n-k} binomial(j, n-2*k)*E2(n-k, j), where E2 are the second-order Eulerian numbers (A008517). - Peter Luschny, Jan 13 2016
Also the Bell transform of the sequence g(k) = k! if k>0 else 0. For the definition of the Bell transform see A264428. - Peter Luschny, Jan 13 2016

Extensions

Removed extra 0 in row 1 from Michael Somos, Jan 19 2011

A000483 Associated Stirling numbers: second-order reciprocal Stirling numbers (Fekete) a(n) = [[n, 3]]. The number of 3-orbit permutations of an n-set with at least 2 elements in each orbit.

Original entry on oeis.org

15, 210, 2380, 26432, 303660, 3678840, 47324376, 647536032, 9418945536, 145410580224, 2377609752960, 41082721413120, 748459539843840, 14345340443665920, 288650580508961280, 6085390148673177600, 134167064248901376000, 3088040233895705088000, 74077507611407752704000, 1849221425299053367296000
Offset: 6

Keywords

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 256.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 75.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000907, A001784, A001785. A diagonal of triangle in A008306.
Cf. A000276.

Programs

  • Mathematica
    nn=25;a=Log[1/(1-x)]-x;Drop[Range[0,nn]!CoefficientList[Series[a^3/3!, {x,0,nn}],x],6]  (* Geoffrey Critzer, Nov 03 2012 *)

Formula

With alternating signs: Ramanujan polynomials psi_4(n-3, x) evaluated at 1. - Ralf Stephan, Apr 16 2004
E.g.f.: -((x+log(1-x))^3)/6. - Vladeta Jovovic, May 03 2008
Conjecture: (n-2)*(n-4)*a(n) -(n-1)*(3*n^2-21*n+35)*a(n-1) +(n-1)*(n-2)*(3*n^2-24*n+47)*a(n-2) -(n-5)*(n-1)*(n-2)*(n-3)*(n-4)*a(n-3)=0. - R. J. Mathar, Jul 18 2015
Conjecture: 3*(-n+4)*a(n) +(9*n^2-59*n+90)*a(n-1) +(-9*n^3+96*n^2-348*n+436)*a(n-2) +(n-3)*(3*n^3-45*n^2+237*n-430)*a(n-3) +5*(n-5)*(n-6)*(n-3)*(n-4)*a(n-4)=0. - R. J. Mathar, Jul 18 2015

Extensions

More terms from Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Dec 14 2000
More terms from Sean A. Irvine, Nov 14 2010

A235706 (I + A132440)^3: Coefficients for normalized generalized Laguerre polynomials n!*Lag(n, 3-n, -x).

Original entry on oeis.org

1, 3, 1, 6, 6, 1, 6, 18, 9, 1, 0, 24, 36, 12, 1, 0, 0, 60, 60, 15, 1, 0, 0, 0, 120, 90, 18, 1, 0, 0, 0, 0, 210, 126, 21, 1, 0, 0, 0, 0, 0, 336, 168, 24, 1, 0, 0, 0, 0, 0, 0, 504, 216, 27, 1, 0, 0, 0, 0, 0, 0, 0, 720, 270, 30, 1
Offset: 0

Author

Tom Copeland, Apr 20 2014

Keywords

Comments

The associated Laguerre polynomials n!*Lag(n,3-n,-x) are related to the rook polynomials of a rectangular 3 X n chessboard by R(3,n,x) = n!*x^n*Lag(n,3-n,-1/x), which are also the matching polynomials, or generating function of the number of k-edge matchings, of the complete bipartite graph K(m,n), or biclique (cf. Wikipedia for details).
The formulas here and below can be naturally extended with 3 replaced by any positive integer m. For m = 1 and 2, see unsigned A132013 and A132014. The formulas there can be extrapolated to apply to this matrix.

Examples

			Triangle begins:
  1;
  3,  1;
  6,  6,  1;
  6, 18,  9,  1;
  0, 24, 36, 12,  1;
  0,  0, 60, 60, 15, 1;
  ...
		

Crossrefs

Cf. A007318, A008306 for a generalization, A132013, A132014, A132440, A238363, A238385.
....................................
With 0th row: 1
n-th row: n!*Lag(n,3-n,-x)
....................................
1st: 1!*Lag(1,2,-x) = A062139(1,k,-x)
2nd: 2!*Lag(2,1,-x) = A105278(2,k,x)
3rd: 3!*Lag(3,0,-x) = A021009(3,k,-x)
4th: 4!*Lag(4,-1,-x) = A111596(4,k,-x)
5th: 5!*Lag(5,-2,-x) = cf. x^2*A062139(3,k,x)
6th: 6!*Lag(6,-3,-x) = cf. x^3*A062137(3,k,-x)
....................................
n-th row: x^(n-3)*3!*Lag(3,n-3,-x)
....................................
1st: x^(-2)*3!Lag(3,-2,-x) = cf. x^(-2)*[x^2*A062139(1,k,x)]
2nd: x^(-1)*3!Lag(3,-1,-x) = x^(-1)*A111596(3,k,-x)
3rd: x^0*3!Lag(3,0,-x) = x^0*A021009(3,k,-x)
4th: x^1*3!Lag(3,1,-x) = x^1*A105278(3,k,x)
5th: x^2*3!Lag(3,2,-x) = x^2*A062139(3,k,-x)
6th: x^3*3!Lag(3,3,-x) = x^3*A062137(3,k,-x)

Programs

  • Magma
    /* As triangle */ [[Binomial(3, n-k)*Factorial(n)/Factorial(k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Jul 28 2017
  • Mathematica
    Table[Binomial[3, n - k] n! / k!, {n, 0, 9}, {k, 0, n}]//Flatten (* Vincenzo Librandi, Jul 28 2017 *)
  • PARI
    T(n,k) = binomial(3,n-k)*n!/k!
    tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n, k), ", ")); print); \\ Michel Marcus, Jul 28 2017
    
  • PARI
    row(n) = Vecrev(n!*pollaguerre(n, 3-n, -x)); \\ Michel Marcus, Feb 06 2021
    

Formula

T(n,k) = binomial(3,n-k)*n!/k! = binomial(n,k)*3!/(3-n+k)!.
E.g.f.: exp(y*x)(1+y)^3, so this is an Appell sequence of polynomials with lowering operator L= D= d/dx and raising operator R = x + 3/(1+D).
E.g.f. of inverse matrix is exp(x*y)/(1+y)^3.
Multiply the n-th diagonal of the Pascal matrix A007318 by d(0)=1, d(1)=3, d(2)=6, d(3)=6, and d(n)=0 for n>3 to obtain T.
Row polynomials: n!*Lag(n,3-n,-x) = x^(n-3)*3!*Lag(3,n-3,-x) =
(3!/(3-n)!)*K(-n,3-n+1,-x) where K is Kummer's confluent hypergeometric function (as a limit of n+c as c tends to zero).
T = (I + A132440)^3 = exp[3*(A238385-I)]. I = identity matrix.
Operationally, n!Lag(n,3-n,-:xD:) = x^(n-3)*:Dx:^n*x^(3-n) = x^(-3)*:xD:^n*x^3 = n!*binomial(xD+3,n) = n!*binomial(3,n)*K(-n,3-n+1,-:xD:) where :AB:^n = A^n*B^n for any two operators.
n-th row polynomial: n!*Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*Lag(k,3,-x). - Peter Bala, Jul 25 2021
Showing 1-10 of 22 results. Next