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

A000522 Total number of ordered k-tuples (k=0..n) of distinct elements from an n-element set: a(n) = Sum_{k=0..n} n!/k!.

Original entry on oeis.org

1, 2, 5, 16, 65, 326, 1957, 13700, 109601, 986410, 9864101, 108505112, 1302061345, 16926797486, 236975164805, 3554627472076, 56874039553217, 966858672404690, 17403456103284421, 330665665962404000, 6613313319248080001, 138879579704209680022, 3055350753492612960485, 70273067330330098091156
Offset: 0

Views

Author

Keywords

Comments

Total number of permutations of all subsets of an n-set.
Also the number of one-to-one sequences that can be formed from n distinct objects.
Old name "Total number of permutations of a set with n elements", or the same with the word "arrangements", both sound too much like A000142.
Related to number of operations of addition and multiplication to evaluate a determinant of order n by cofactor expansion - see A026243.
a(n) is also the number of paths (without loops) in the complete graph on n+2 vertices starting at one vertex v1 and ending at another v2. Example: when n=2 there are 5 paths in the complete graph with 4 vertices starting at the vertex 1 and ending at the vertex 2: (12),(132),(142),(1342),(1432) so a(2) = 5. - Avi Peretz (njk(AT)netvision.net.il), Feb 23 2001; comment corrected by Jonathan Coxhead, Mar 21 2003
Also row sums of Table A008279, which can be generated by taking the derivatives of x^k. For example, for y = 1*x^3, y' = 3x^2, y" = 6x, y'''= 6 so a(4) = 1 + 3 + 6 + 6 = 16. - Alford Arnold, Dec 15 1999
a(n) is the permanent of the n X n matrix with 2s on the diagonal and 1s elsewhere. - Yuval Dekel, Nov 01 2003
(A000166 + this_sequence)/2 = A009179, (A000166 - this_sequence)/2 = A009628.
Stirling transform of A006252(n-1) = [1,1,1,2,4,14,38,...] is a(n-1) = [1,2,5,16,65,...]. - Michael Somos, Mar 04 2004
Number of {12,12*,21*}- and {12,12*,2*1}-avoiding signed permutations in the hyperoctahedral group.
a(n) = b such that Integral_{x=0..1} x^n*exp(-x) dx = a-b*exp(-1). - Sébastien Dumortier, Mar 05 2005
a(n) is the number of permutations on [n+1] whose left-to-right record lows all occur at the start. Example: a(2) counts all permutations on [3] except 231 (the last entry is a record low but its predecessor is not). - David Callan, Jul 20 2005
a(n) is the number of permutations on [n+1] that avoid the (scattered) pattern 1-2-3|. The vertical bar means the "3" must occur at the end of the permutation. For example, 21354 is not counted by a(4): 234 is an offending subpermutation. - David Callan, Nov 02 2005
Number of deco polyominoes of height n+1 having no reentrant corners along the lower contour (i.e., no vertical step that is followed by a horizontal step). In other words, a(n)=A121579(n+1,0). A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column. Example: a(1)=2 because the only deco polyominoes of height 2 are the vertical and horizontal dominoes, having no reentrant corners along their lower contours. - Emeric Deutsch, Aug 16 2006
Unreduced numerators of partial sums of the Taylor series for e. - Jonathan Sondow, Aug 18 2006
a(n) is the number of permutations on [n+1] (written in one-line notation) for which the subsequence beginning at 1 is increasing. Example: a(2)=5 counts 123, 213, 231, 312, 321. - David Callan, Oct 06 2006
a(n) is the number of permutations (written in one-line notation) on the set [n + k], k >= 1, for which the subsequence beginning at 1,2,...,k is increasing. Example: n = 2, k = 2. a(2) = 5 counts 1234, 3124, 3412, 4123, 4312. - Peter Bala, Jul 29 2014
a(n) and (1,-2,3,-4,5,-6,7,...) form a reciprocal pair under the list partition transform and associated operations described in A133314. - Tom Copeland, Nov 01 2007
Consider the subsets of the set {1,2,3,...,n} formed by the first n integers. E.g., for n = 3 we have {}, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}. Let the variable sbst denote a subset. For each subset sbst we determine its number of parts, that is nprts(sbst). The sum over all possible subsets is written as Sum_{sbst=subsets}. Then a(n) = Sum_{sbst=subsets} nprts(sbst)!. E.g., for n = 3 we have 1!+1!+1!+1!+2!+2!+2!+3!=16. - Thomas Wieder, Jun 17 2006
Equals row sums of triangle A158359(unsigned). - Gary W. Adamson, Mar 17 2009
Equals eigensequence of triangle A158821. - Gary W. Adamson, Mar 30 2009
For positive n, equals 1/BarnesG(n+1) times the determinant of the n X n matrix whose (i,j)-coefficient is the (i+j)th Bell number. - John M. Campbell, Oct 03 2011
a(n) is the number of n X n binary matrices with i) at most one 1 in each row and column and ii) the subset of rows that contain a 1 must also be the columns that contain a 1. Cf. A002720 where restriction ii is removed. - Geoffrey Critzer, Dec 20 2011
Number of restricted growth strings (RGS) [d(1),d(2),...,d(n)] such that d(k) <= k and d(k) <= 1 + (number of nonzero digits in prefix). The positions of nonzero digits determine the subset, and their values (decreased by 1) are the (left) inversion table (a rising factorial number) for the permutation, see example. - Joerg Arndt, Dec 09 2012
Number of a restricted growth strings (RGS) [d(0), d(1), d(2), ..., d(n)] where d(k) >= 0 and d(k) <= 1 + chg([d(0), d(1), d(2), ..., d(k-1)]) and chg(.) gives the number of changes of its argument. Replacing the function chg(.) by a function asc(.) that counts the ascents in the prefix gives A022493 (ascent sequences). - Joerg Arndt, May 10 2013
The sequence t(n) = number of i <= n such that floor(e*i!) is a square is mentioned in the abstract of Luca & Shparlinski. The values are t(n) = 0 for 0 <= n <= 2 and t(n) = 1 for at least 3 <= n <= 300. - R. J. Mathar, Jan 16 2014
a(n) = p(n,1) = q(n,1), where p and q are polynomials defined at A248664 and A248669. - Clark Kimberling, Oct 11 2014
a(n) is the number of ways at most n people can queue up at a (slow) ticket counter when one or more of the people may choose not to queue up. Note that there are C(n,k) sets of k people who quene up and k! ways to queue up. Since k can run from 0 to n, a(n) = Sum_{k=0..n} n!/(n-k)! = Sum_{k=0..n} n!/k!. For example, if n=3 and the people are A(dam), B(eth), and C(arl), a(3)=16 since there are 16 possible lineups: ABC, ACB, BAC, BCA, CAB, CBA, AB, BA, AC, CA, BC, CB, A, B, C, and empty queue. - Dennis P. Walsh, Oct 02 2015
As the row sums of A008279, Motzkin uses the abbreviated notation $n_<^\Sigma$ for a(n).
The piecewise polynomial function f defined by f(x) = a(n)*x^n/n! on each interval [ 1-1/a(n), 1-1/a(n+1) ) is continuous on [0,1) and lim_{x->1} f(x) = e. - Luc Rousseau, Oct 15 2019
a(n) is composite for 3 <= n <= 2015, but a(2016) is prime (or at least a strong pseudoprime): see Johansson link. - Robert Israel, Jul 27 2020 [a(2016) is prime, ECPP certificate generated with CM 0.4.3 and checked by factordb. - Jason H Parker, Jun 15 2025]
In general, sequences of the form a(0)=a, a(n) = n*a(n-1) + k, n>0, will have a closed form of n!*a + floor(n!*(e-1))*k. - Gary Detlefs, Oct 26 2020
From Peter Bala, Apr 03 2022: (Start)
a(2*n) is odd and a(2*n+1) is even. More generally, a(n+k) == a(n) (mod k) for all n and k. It follows that for each positive integer k, the sequence obtained by reducing a(n) modulo k is periodic, with the exact period dividing k. Various divisibility properties of the sequence follow from this; for example, a(5*n+2) == a(5*n+4) == 0 (mod 5), a(25*n+7) == a(25*n+19) == 0 (mod 25) and a(13*n+4) == a(13*n+10)== a(13*n+12) == 0 (mod 13). (End)
Number of possible ranking options on a typical ranked choice voting ballot with n candidates (allowing undervotes). - P. Christopher Staecker, May 05 2024
From Thomas Scheuerle, Dec 28 2024: (Start)
Number of decorated permutations of size n.
Number of Le-diagrams with bounding box semiperimeter n, for n > 0.
By counting over all k = 1..n and n > 0, the number of positroid cells for the totally nonnegative real Grassmannian Gr(k, n), equivalently the number of Grassmann necklaces of type (k, n). (End)

Examples

			G.f. = 1 + 2*x + 5*x^2 + 16*x^3 + 65*x^4 + 326*x^5 + 1957*x^6 + 13700*x^7 + ...
With two objects we can form 5 sequences: (), (a), (b), (a,b), (b,a), so a(2) = 5.
From _Joerg Arndt_, Dec 09 2012: (Start)
The 16 arrangements of the 3-set and their RGS (dots denote zeros) are
  [ #]       RGS        perm. of subset
  [ 1]    [ . . . ]      [  ]
  [ 2]    [ . . 1 ]      [ 3 ]
  [ 3]    [ . 1 . ]      [ 2 ]
  [ 4]    [ . 1 1 ]      [ 2 3 ]
  [ 5]    [ . 1 2 ]      [ 3 2 ]
  [ 6]    [ 1 . . ]      [ 1 ]
  [ 7]    [ 1 . 1 ]      [ 1 3 ]
  [ 8]    [ 1 . 2 ]      [ 3 1 ]
  [ 9]    [ 1 1 . ]      [ 1 2 ]
  [10]    [ 1 1 1 ]      [ 1 2 3 ]
  [11]    [ 1 1 2 ]      [ 1 3 2 ]
  [12]    [ 1 1 3 ]      [ 2 3 1 ]
  [13]    [ 1 2 . ]      [ 2 1 ]
  [14]    [ 1 2 1 ]      [ 2 1 3 ]
  [15]    [ 1 2 2 ]      [ 3 1 2 ]
  [16]    [ 1 2 3 ]      [ 3 2 1 ]
(End)
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 75, Problem 9.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 65, p. 23, Ellipses, Paris 2008.
  • J. M. Gandhi, On logarithmic numbers, Math. Student, 31 (1963), 73-83.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section E11.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 16.
  • D. Singh, The numbers L(m,n) and their relations with prepared Bernoulli and Eulerian numbers, Math. Student, 20 (1952), 66-70.
  • 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

Average of n-th row of triangle in A068424 [Corrected by N. J. A. Sloane, Feb 29 2024].
Row sums of A008279 and A094816.
First differences give A001339. Second differences give A001340.
Partial sums are in A001338, A002104.
A row of the array in A144502.
See also A370973, Nearest integer to e*n!.

Programs

  • Haskell
    import Data.List (subsequences, permutations)
    a000522 = length . choices . enumFromTo 1 where
    choices = concat . map permutations . subsequences
    -- Reinhard Zumkeller, Feb 21 2012, Oct 25 2010
    
  • Magma
    [1] cat [n eq 1 select (n+1) else n*Self(n-1)+1: n in [1..25]]; // Vincenzo Librandi, Feb 15 2015
    
  • Maple
    a(n):= exp(1)*int(x^n*exp(-x)*Heaviside(x-1), x=0..infinity); # Karol A. Penson, Oct 01 2001
    A000522 := n->add(n!/k!,k=0..n);
    G(x):=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],n=0..20);
    # Zerinvary Lajos, Apr 03 2009
    G:=exp(z)/(1-z): Gser:=series(G,z=0,21):
    for n from 0 to 20 do a(n):=n!*coeff(Gser,z,n): end do
    # Paul Weisenhorn, May 30 2010
    k := 1; series(hypergeom([1,k],[],x/(1-x))/(1-x), x=0, 20); # Mark van Hoeij, Nov 07 2011
    # one more Maple program:
    a:= proc(n) option remember;
          `if`(n<0, 0, 1+n*a(n-1))
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, Sep 13 2019
    seq(simplify(KummerU(-n, -n, 1)), n = 0..23); # Peter Luschny, May 10 2022
  • Mathematica
    Table[FunctionExpand[Gamma[n + 1, 1]*E], {n, 0, 24}]
    nn = 20; Accumulate[Table[1/k!, {k, 0, nn}]] Range[0, nn]! (* Jan Mangaldan, Apr 21 2013 *)
    FoldList[#1*#2 + #2 &, 0, Range@ 23] + 1 (* or *)
    f[n_] := Floor[E*n!]; f[0] = 1; Array[f, 20, 0] (* Robert G. Wilson v, Feb 13 2015 *)
    RecurrenceTable[{a[n + 1] == (n + 1) a[n] + 1, a[0] == 1}, a, {n, 0, 12}] (* Emanuele Munarini, Apr 27 2017 *)
    nxt[{n_,a_}]:={n+1,a(n+1)+1}; NestList[nxt,{0,1},30][[All,2]] (* Harvey P. Dale, Jan 29 2023 *)
  • Maxima
    a(n) := if n=0 then 1 else n*a(n-1)+1; makelist(a(n),n,0,12); /* Emanuele Munarini, Apr 27 2017 */
  • PARI
    {a(n) = local(A); if( n<0, 0, A = vector(n+1); A[1]=1; for(k=1, n, A[k+1] = k*A[k] + 1); A[n+1])}; /* Michael Somos, Jul 01 2004 */
    
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( exp( x +x * O(x^n)) / (1 - x), n))}; /* Michael Somos, Mar 06 2004 */
    
  • PARI
    a(n)=local(A=1+x+x*O(x^n)); for(i=1, n, A=1/(1-x)^2+x^2*deriv(A)/(1-x)); polcoeff(A, n) \\ Paul D. Hanna, Sep 03 2008
    
  • PARI
    {a(n)=local(X=x+x*O(x^n));polcoeff(sum(m=0,n,(m+2)^m*x^m/(1+(m+1)*X)^(m+1)),n)} /* Paul D. Hanna */
    
  • PARI
    a(n)=sum(k=0,n,binomial(n,k)*k!); \\ Joerg Arndt, Dec 14 2014
    
  • Sage
    # program adapted from Alois P. Heinz's Maple code in A022493
    @CachedFunction
    def b(n, i, t):
        if n <= 1:
            return 1
        return sum(b(n - 1, j, t + (j == i)) for j in range(t + 2))
    def a(n):
        return b(n, 0, 0)
    v000522 = [a(n) for n in range(33)]
    print(v000522)
    # Joerg Arndt, May 11 2013
    

Formula

a(n) = n*a(n-1) + 1, a(0) = 1.
a(n) = A007526(n-1) + 1.
a(n) = A061354(n)*A093101(n).
a(n) = n! * Sum_{k=0..n} 1/k! = n! * (e - Sum_{k>=n+1} 1/k!). - Michael Somos, Mar 26 1999
a(0) = 1; for n > 0, a(n) = floor(e*n!).
E.g.f.: exp(x)/(1-x).
a(n) = 1 + Sum_{n>=k>=j>=0} (k-j+1)*k!/j! = a(n-1) + A001339(n-1) = A007526(n) + 1. Binomial transformation of n!, i.e., A000142. - Henry Bottomley, Jun 04 2001
a(n) = floor(2/(n+1))*A009578(n+1)-1. - Emeric Deutsch, Oct 24 2001
Integral representation as n-th moment of a nonnegative function on a positive half-axis: a(n) = e*Integral_{x>=0} x^n*e^(-x)*Heaviside(x-1) dx. - Karol A. Penson, Oct 01 2001
Formula, in Mathematica notation: Special values of Laguerre polynomials, a(n)=(-1)^n*n!*LaguerreL[n, -1-n, 1], n=1, 2, ... . This relation cannot be checked by Maple, as it appears that Maple does not incorporate Laguerre polynomials with second index equal to negative integers. It does check with Mathematica. - Karol A. Penson and Pawel Blasiak ( blasiak(AT)lptl.jussieu.fr), Feb 13 2004
G.f.: Sum_{k>=0} k!*x^k/(1-x)^(k+1). a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*k^(n-k)*(k+1)^k. - Vladeta Jovovic, Aug 18 2002
a(n) = Sum_{k=0..n} A008290(n, k)*2^k. - Philippe Deléham, Dec 12 2003
a(n) = Sum_{k=0..n} A046716(n, k). - Philippe Deléham, Jun 12 2004
a(n) = e*Gamma(n+1,1) where Gamma(z,t) = Integral_{x>=t} e^(-x)*x^(z-1) dx is incomplete gamma function. - Michael Somos, Jul 01 2004
a(n) = Sum_{k=0..n} P(n, k). - Ross La Haye, Aug 28 2005
Given g.f. A(x), then g.f. A059115 = A(x/(1-x)). - Michael Somos, Aug 03 2006
a(n) = 1 + n + n*(n-1) + n*(n-1)*(n-2) + ... + n!. - Jonathan Sondow, Aug 18 2006
a(n) = Sum_{k=0..n} binomial(n,k) * k!; interpretation: for all k-subsets (sum), choose a subset (binomial(n,k)), and permutation of subset (k!). - Joerg Arndt, Dec 09 2012
a(n) = Integral_{x>=0} (x+1)^n*e^(-x) dx. - Gerald McGarvey, Oct 19 2006
a(n) = Sum_{k=0..n} A094816(n, k), n>=0 (row sums of Poisson-Charlier coefficient matrix). - N. J. A. Sloane, Nov 10 2007
From Tom Copeland, Nov 01 2007, Dec 10 2007: (Start)
Act on 1/(1-x) with 1/(1-xDx) = Sum_{j>=0} (xDx)^j = Sum_{j>=0} x^j*D^j*x^j = Sum_{j>=0} j!*x^j*L(j,-:xD:,0) where Lag(n,x,0) are the Laguerre polynomials of order 0, D the derivative w.r.t. x and (:xD:)^j = x^j*D^j. Truncating the operator series at the j = n term gives an o.g.f. for a(0) through a(n) consistent with Jovovic's.
These results and those of Penson and Blasiak, Arnold, Bottomley and Deleham are related by the operator A094587 (the reverse of A008279), which is the umbral equivalent of n!*Lag[n,(.)!*Lag[.,x,-1],0] = (1-D)^(-1) x^n = (-1)^n * n! Lag(n,x,-1-n) = Sum_{j=0..n} binomial(n,j)*j!*x^(n-j) = Sum_{j=0..n} (n!/j!)*x^j. Umbral substitution of b(.) for x and then letting b(n)=1 for all n connects the results. See A132013 (the inverse of A094587) for a connection between these operations and 1/(1-xDx).
(End)
From Peter Bala, Jul 15 2008: (Start)
a(n) = n!*e - 1/(n + 1/(n+1 + 2/(n+2 + 3/(n+3 + ...)))).
Asymptotic result (Ramanujan): n!*e - a(n) ~ 1/n - 1/n^3 + 1/n^4 + 2/n^5 - 9/n^6 + ..., where the sequence [1,0,-1,1,2,-9,...] = [(-1)^k*A000587(k)], for k>=1.
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). For fixed k, define the derived sequence a_k(n) = (a(n+k)-a(k))/n, n = 1,2,3,... . Then a_k(n) is also a difference divisibility sequence.
For example, the derived sequence a_0(n) is just a(n-1). The set of integer sequences satisfying the difference divisibility property forms a ring with term-wise operations of addition and multiplication.
Recurrence relations: a(0) = 1, a(n) = (n-1)*(a(n-1) + a(n-2)) + 2, for n >= 1. a(0) = 1, a(1) = 2, D-finite with recurrence: a(n) = (n+1)*a(n-1) - (n-1)*a(n-2) for n >= 2. The sequence b(n) := n! satisfies the latter recurrence with the initial conditions b(0) = 1, b(1) = 1. This leads to the finite continued fraction expansion a(n)/n! = 1/(1-1/(2-1/(3-2/(4-...-(n-1)/(n+1))))), n >= 2.
Limit_{n->oo} a(n)/n! = e = 1/(1-1/(2-1/(3-2/(4-...-n/((n+2)-...))))). This is the particular case m = 0 of the general result m!/e - d_m = (-1)^(m+1) *(1/(m+2 -1/(m+3 -2/(m+4 -3/(m+5 -...))))), where d_m denotes the m-th derangement number A000166(m).
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 A001339 (r=1), A082030 (r=2), A095000 (r=3) and A095177 (r=4).
For the corresponding results for the constants log(2), zeta(2) and zeta(3) refer to A142992, A108625 and A143007 respectively.
(End)
G.f. satisfies: A(x) = 1/(1-x)^2 + x^2*A'(x)/(1-x). - Paul D. Hanna, Sep 03 2008
From Paul Barry, Nov 27 2009: (Start)
G.f.: 1/(1-2*x-x^2/(1-4*x-4*x^2/(1-6*x-9*x^2/(1-8*x-16*x^2/(1-10*x-25*x^2/(1-... (continued fraction);
G.f.: 1/(1-x-x/(1-x/(1-x-2*x/(1-2*x/(1-x-3*x/(1-3*x/(1-x-4*x/(1-4*x/(1-x-5*x/(1-5*x/(1-... (continued fraction).
(End)
O.g.f.: Sum_{n>=0} (n+2)^n*x^n/(1 + (n+1)*x)^(n+1). - Paul D. Hanna, Sep 19 2011
G.f. hypergeom([1,k],[],x/(1-x))/(1-x), for k=1,2,...,9 is the generating function for A000522, A001339, A082030, A095000, A095177, A096307, A096341, A095722, and A095740. - Mark van Hoeij, Nov 07 2011
G.f.: 1/U(0) where U(k) = 1 - x - x*(k+1)/(1 - x*(k+1)/U(k+1)); (continued fraction). - Sergei N. Gladkovskii, Oct 14 2012
E.g.f.: 1/U(0) where U(k) = 1 - x/(1 - 1/(1 + (k+1)/U(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 16 2012
G.f.: 1/(1-x)/Q(0), where Q(k) = 1 - x/(1-x)*(k+1)/(1 - x/(1-x)*(k+1)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, May 19 2013
G.f.: 2/(1-x)/G(0), where G(k) = 1 + 1/(1 - x*(2*k+2)/(x*(2*k+3) - 1 + x*(2*k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 31 2013
G.f.: (B(x)+ 1)/(2-2*x) = Q(0)/(2-2*x), where B(x) be g.f. A006183, Q(k) = 1 + 1/(1 - x*(k+1)/(x*(k+1) + (1-x)/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 08 2013
G.f.: 1/Q(0), where Q(k) = 1 - 2*x*(k+1) - x^2*(k+1)^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Sep 30 2013
E.g.f.: e^x/(1-x) = (1 - 12*x/(Q(0) + 6*x - 3*x^2))/(1-x), where Q(k) = 2*(4*k+1)*(32*k^2 + 16*k + x^2 - 6) - x^4*(4*k-1)*(4*k+7)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Nov 18 2013
G.f.: conjecture: T(0)/(1-2*x), where T(k) = 1 - x^2*(k+1)^2/(x^2*(k+1)^2 - (1 - 2*x*(k+1))*(1 - 2*x*(k+2))/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Nov 18 2013
0 = a(n)*(+a(n+1) - 3*a(n+2) + a(n+3)) + a(n+1)*(+a(n+1) - a(n+3)) + a(n+2)*(+a(n+2)) for all n>=0. - Michael Somos, Jul 04 2014
From Peter Bala, Jul 29 2014: (Start)
a(n) = F(n), where the function F(x) := Integral_{0..infinity} e^(-u)*(1 + u)^x du smoothly interpolates this sequence to all real values of x. Note that F(-1) = G and for n = 2,3,... we have F(-n) = (-1)^n/(n-1)! *( A058006(n-2) - G ), where G = 0.5963473623... denotes Gompertz's constant - see A073003.
a(n) = n!*e - e*( Sum_{k >= 0} (-1)^k/((n + k + 1)*k!) ).
(End)
a(n) = hypergeometric_U(1, n+2, 1). - Peter Luschny, Nov 26 2014
a(n) ~ exp(1-n)*n^(n-1/2)*sqrt(2*Pi). - Vladimir Reshetnikov, Oct 27 2015
a(n) = A038155(n+2)/A000217(n+1). - Anton Zakharov, Sep 08 2016
a(n) = round(exp(1)*n!), n > 1 - Simon Plouffe, Jul 28 2020
a(n) = KummerU(-n, -n, 1). - Peter Luschny, May 10 2022
a(n) = (e/(2*Pi))*Integral_{x=-oo..oo} (n+1+i*x)!/(1+i*x) dx. - David Ulgenes, Apr 18 2023
Sum_{i=0..n} (-1)^(n-i) * binomial(n, i) * a(i) = n!. - Werner Schulte, Apr 03 2024

Extensions

Additional comments from Michael Somos

A274174 Number of compositions of n if all summand runs are kept together.

Original entry on oeis.org

1, 1, 2, 4, 7, 12, 22, 36, 60, 97, 162, 254, 406, 628, 974, 1514, 2305, 3492, 5254, 7842, 11598, 17292, 25294, 37090, 53866, 78113, 112224, 161092, 230788, 328352, 466040, 658846, 928132, 1302290, 1821770, 2537156, 3536445, 4897310, 6777806, 9341456, 12858960, 17625970, 24133832, 32910898, 44813228, 60922160, 82569722
Offset: 0

Views

Author

Gregory L. Simay, Jun 12 2016

Keywords

Comments

a(n^2) is odd. - Gregory L. Simay, Jun 23 2019
Also the number of compositions of n avoiding the patterns (1,2,1) and (2,1,2). - Gus Wiseman, Jul 07 2020

Examples

			If the summand runs are blocked together, there are 22 compositions of a(6): 6; 5+1, 1+5, 4+2, 2+4, (3+3), 4+(1+1), (1+1)+4, 1+2+3, 1+3+2, 2+1+3, 2+3+1, 3+1+2, 3+2+1, (2+2+2), 3+(1+1+1), (1+1+1)+3, (2+2)+(1+1), (1+1)+(2+2), 2+(1+1+1+1), (1+1+1+1)+2, (1+1+1+1+1+1).
a(0)=1; a(1)= 1; a(4) = 7; a(9) = 97; a(16) = 2305; a(25) = 78113 and a(36) = 3536445. - _Gregory L. Simay_, Jun 23 2019
		

Crossrefs

The version for patterns is A001339.
The version for prime indices is A333175.
The complement (i.e., the matching version) is A335548.
Anti-run compositions are A003242.
(1,2,1)- and (2,1,2)-matching permutations of prime indices are A335462.
(1,2,1)-matching compositions are A335470.
(1,2,1)-avoiding compositions are A335471.
(2,1,2)-matching compositions are A335472.
(2,1,2)-avoiding compositions are A335473.

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
           add(b(n-i*j, i-1, p+`if`(j=0, 0, 1)), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jun 12 2016
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[Split[#]]==Length[Union[#]]&]],{n,0,10}] (* Gus Wiseman, Jul 07 2020 *)
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0,
        Sum[b[n - i*j, i - 1, p + If[j == 0, 0, 1]], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 11 2021, after Alois P. Heinz *)

Formula

a(n) = Sum_{k>=0} k! * A116608(n,k). - Joerg Arndt, Jun 12 2016

Extensions

Terms a(9) and beyond from Joerg Arndt, Jun 12 2016

A010784 Numbers with distinct decimal digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 102, 103, 104, 105, 106, 107, 108, 109, 120
Offset: 1

Views

Author

Keywords

Comments

More than the usual number of terms are displayed in order to show the difference from some closely related sequences.
Also: a(1) = 0; a(n) = Min{x integer | x > a(n-1) and all digits to base 10 are distinct}.
This sequence is finite: a(8877691) = 9876543210 is the last term; a(8877690) = 9876543201. The largest gap between two consecutive terms before a(249999) = 2409653 is 104691, as a(175289) = 1098765, a(175290) = 1203456. - Reinhard Zumkeller, Jun 23 2001
Complement of A109303. - David Wasserman, May 21 2008
For the analogs in other bases b, search for "xenodromes." A001339(b-1) is the number of base b xenodromes for b >= 2. - Rick L. Shepherd, Feb 16 2013
A073531 gives the number of positive n-digit numbers in this sequence. Note that it does not count 0. - T. D. Noe, Jul 09 2013
Can be seen as irregular table whose n-th row holds the n-digit terms; length of row n is then A073531(n) = 9*9!/(10-n)! except for n = 1 where we have 10 terms, unless 0 is considered to belong to a row 0. - M. F. Hasler, Dec 10 2018

Crossrefs

Subsequence of A043096.
Cf. A109303, A029740 (odds), A029741 (evens), A029743 (primes), A001339.

Programs

  • Haskell
    a010784 n = a010784_list !! (n-1)
    a010784_list = filter ((== 1) . a178788) [1..]
    -- Reinhard Zumkeller, Sep 29 2011
    
  • Mathematica
    Select[Range[0,100], Max[DigitCount[#]] == 1 &] (* Harvey P. Dale, Apr 04 2013 *)
  • PARI
    is(n)=my(v=vecsort(digits(n)));v==vecsort(v,,8) \\ Charles R Greathouse IV, Sep 17 2012
    
  • PARI
    select( is(n)=!n||#Set(digits(n))==logint(n,10)+1, [0..120]) \\ M. F. Hasler, Dec 10 2018
    
  • PARI
    apply( A010784_row(n,L=List(if(n>1,[])))={forvec(d=vector(n,i,[0,9]),forperm(d,p,p[1]&&listput(L,fromdigits(Vec(p)))),2);Set(L)}, [1..2]) \\ A010784_row(n) returns all terms with n digits. - M. F. Hasler, Dec 10 2018
    
  • Python
    A010784_list = [n for n in range(10**6) if len(set(str(n))) == len(str(n))] # Chai Wah Wu, Oct 13 2019
    
  • Python
    # alternate for generating full sequence
    from itertools import permutations
    afull = [0] + [int("".join(p)) for d in range(1, 11) for p in permutations("0123456789", d) if p[0] != "0"]
    print(afull[:100]) # Michael S. Branicky, Aug 04 2022
    
  • Scala
    def hasDistinctDigits(n: Int): Boolean = {
      val numerStr = n.toString
      val digitSet = numerStr.split("").toSet
      numerStr.length == digitSet.size
    }
    (0 to 99).filter(hasDistinctDigits) // Alonso del Arte, Jan 09 2020

Formula

A178788(a(n)) = 1; A178787(a(n)) = n; A043537(a(n)) = A055642(a(n)). - Reinhard Zumkeller, Jun 30 2010
A107846(a(n)) = 0. - Reinhard Zumkeller, Jul 09 2013

Extensions

Offset changed to 1 and first comment adjusted by Reinhard Zumkeller, Jun 14 2010

A007526 a(n) = n*(a(n-1) + 1), a(0) = 0.

Original entry on oeis.org

0, 1, 4, 15, 64, 325, 1956, 13699, 109600, 986409, 9864100, 108505111, 1302061344, 16926797485, 236975164804, 3554627472075, 56874039553216, 966858672404689, 17403456103284420, 330665665962403999, 6613313319248080000, 138879579704209680021, 3055350753492612960484
Offset: 0

Views

Author

Keywords

Comments

Eighteenth- and nineteenth-century combinatorialists call this the number of (nonnull) "variations" of n distinct objects, namely the number of permutations of nonempty subsets of {1,...,n}. Some early references to this sequence are Izquierdo (1659), Caramuel de Lobkowitz (1670), Prestet (1675) and Bernoulli (1713). - Don Knuth, Oct 16 2001, Aug 16 2004
Stirling transform of A006252(n-1) = [0,1,1,2,4,14,38,...] is a(n-1) = [0,1,4,15,64,...]. - Michael Somos, Mar 04 2004
In particular, for n >= 1 a(n) is the number of nonempty sequences with n or fewer terms, each a distinct element of {1,...,n}. - Rick L. Shepherd, Jun 08 2005
a(n) = VarScheme(1,n). See A128195 for the definition of VarScheme(k,n). - Peter Luschny, Feb 26 2007
if s(n) is a sequence of the form s(0)=x, s(n)= n(s(n-1)+k), then s(n)= n!*x + a(n)*k. - Gary Detlefs, Jun 06 2010
Exponential convolution of factorials (A000142) and nonnegative integers (A001477). - Vladimir Reshetnikov, Oct 07 2016
For n > 0, a(n) is the number of maps f: {1,...,n} -> {1,...,n} satisfying equal(x,y) <= equal(f(x),f(y)) for all x,y, where equal(x,y) is n if x and y are equal and min(x,y) if not. Here equal(x,y) is the equality predicate in the n-valued Gödel logic, see e. g. the Wikipedia chapter on many-valued logics. - Mamuka Jibladze, Mar 12 2025

Examples

			G.f. = x + 4*x^2 + 15*x^3 + 64*x^4 + 325*x^5 + 1956*x^6 + 13699*x^7 + ...
Consider the nonempty subsets of the set {1,2,3,...,n} formed by the first n integers. E.g., for n = 3 we have {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}. For each subset S we determine its number of parts, that is nprts(S). The sum over all subsets is written as sum_{S=subsets}. Then we have A007526 = Sum_{S=subsets} nprts(S)!. E.g., for n = 3 we have 1!+1!+1!+2!+2!+2!+3! = 15. - _Thomas Wieder_, Jun 17 2006
a(3)=15: Let the objects be a, b, and c. The fifteen nonempty ordered subsets are {a}, {b}, {c}, {ab}, {ba}, {ac}, {ca}, {bc}, {cb}, {abc}, {acb}, {bac}, {bca}, {cab} and {cba}.
		

References

  • Jacob Bernoulli, Ars Conjectandi (1713), page 127.
  • Johannes Caramuel de Lobkowitz, Mathesis Biceps Vetus et Nova (Campania: 1670), volume 2, 942-943.
  • J. K. Horn, personal communication to Robert G. Wilson v.
  • Sebastian Izquierdo, Pharus Scientiarum (Lyon: 1659), 327-328.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A068424.
Partial sums of A001339.
Column k=1 of A326659.

Programs

  • GAP
    a:=[0];; for n in [2..25] do a[n]:=(n-1)*(a[n-1]+1); od; a; # Muniru A Asiru, Aug 07 2018
  • Haskell
    a007526 n = a007526_list !! n
    a007526_list = 0 : zipWith (*) [1..] (map (+ 1) a007526_list)
    -- Reinhard Zumkeller, Aug 27 2013
    
  • Maple
    A007526 := n -> add(n!/k!,k=0..n) - 1;
    a := n -> n*hypergeom([1,1-n],[],-1):
    seq(simplify(a(n)), n=0..22); # Peter Luschny, May 09 2017
    # third Maple program:
    a:= proc(n) option remember;
          `if`(n<0, 0, n*(1+a(n-1)))
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, Jan 06 2020
  • Mathematica
    Table[ Sum[n!/(n - r)!, {r, 1, n}], {n, 0, 20}] (* or *) Table[n!*Sum[1/k!, {k, 0, n - 1}], {n, 0, 20}]
    a=1;Table[a=(a-1)*(n-1);Abs[a],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Nov 20 2009 *)
    FoldList[#1*#2 + #2 &, 0, Range[19]] (* Robert G. Wilson v, Jul 07 2012 *)
    f[n_] := Floor[E*n! - 1]; f[0] = 0; Array[f, 20, 0] (* Robert G. Wilson v, Feb 06 2015 *)
    a[n_] := n (a[n - 1] +1); a[0] = 0; Array[a, 20, 0] (* Robert G. Wilson v, Feb 06 2015 *)
    Round@Table[E n Gamma[n, 1], {n, 0, 20}] (* Round is equivalent to FullSimplify here, but is much faster - Vladimir Reshetnikov, Oct 07 2016 *)
  • PARI
    {a(n) = if( n<1, 0, n * (a(n-1) + 1))}; /* Michael Somos, Apr 06 2003 */
    
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff(x * exp(x + x * O(x^n)) / (1 - x), n))}; /* Michael Somos, Mar 04 2004 */
    
  • PARI
    a(n)= sum(k=1,n, prod(j=0,k-1,n-j))
    

Formula

a(n) = A000522(n) - 1.
a(n) = floor(e*n! - 1). - Joseph K. Horn
a(n) = Sum_{r=1..n} A008279(n, r)= n!*(Sum_{k=0..n-1} 1/k!).
a(n) = n*(a(n-1) + 1).
E.g.f.: x*exp(x)/(1-x). - Vladeta Jovovic, Aug 25 2002
a(n) = Sum_{k=1..n} k!*C(n, k). - Benoit Cloitre, Dec 06 2002
a(n) = Sum_{k=0..n-1} (n! / k!). - Ross La Haye, Sep 22 2004
a(n) = Sum_{k=1..n} (Product_{j=0..k-1} (n-j)). - Joerg Arndt, Apr 24 2011
Binomial transform of n! - !n. - Paul Barry, May 12 2004
Inverse binomial transform of A066534. - Ross La Haye, Sep 16 2004
For n > 0, a(n) = exp(1) * Integral_{x>=0} exp(-exp(x/n)+x) dx. - Gerald McGarvey, Oct 19 2006
a(n) = Integral_{x>=0} (((1+x)^n-1)*exp(-x)). - Paul Barry, Feb 06 2008
a(n) = GAMMA(n+2)*(1+(-GAMMA(n+1)+exp(1)*GAMMA(n+1, 1))/GAMMA(n+1)). - Thomas Wieder, May 02 2009
E.g.f.: -1/G(0) where G(k) = 1 - 1/(x - x^3/(x^2+(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 10 2012
Conjecture : a(n) = (n+2)*a(n-1) - (2*n-1)*a(n-2) + (n-2)*a(n-3). - R. J. Mathar, Dec 04 2012 [Conjecture verified by Robert FERREOL, Aug 04 2018]
G.f.: (Q(0) - 1)/(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))); (continued fraction). - Sergei N. Gladkovskii, May 09 2013
G.f.: 2/((1-x)*G(0)) - 1/(1-x), where G(k)= 1 + 1/(1 - x*(2*k+2)/(x*(2*k+3) - 1 + x*(2*k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 31 2013
a(n) = (...((((((0)+1)*1+1)*2+1)*3+1)*4+1)...*n). - Bob Selcoe, Jul 04 2013
G.f.: Q(0)/(2-2*x) - 1/(1-x), where Q(k)= 1 + 1/(1 - x*(k+1)/(x*(k+1) + (1-x)/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 09 2013
G.f.: (W(0) - 1)/(1-x), where W(k) = 1 - x*(k+1)/( x*(k+2) - 1/(1 - x*(k+1)/( x*(k+1) - 1/W(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Aug 25 2013
For n > 0: a(n) = n*A000522(n-1). - Reinhard Zumkeller, Aug 27 2013
a(n) = (...(((((0)*1+1)*2+2)*3+3)*4+4)...*n+n). - Bob Selcoe, Apr 30 2014
0 = 1 + a(n)*(+1 + a(n+1) - a(n+2)) + a(n+1)*(+2 +a(n+1)) - a(n+2) for all n >= 0. - Michael Somos, Aug 30 2016
a(n) = n*hypergeom([1, 1-n], [], -1). - Peter Luschny, May 09 2017
Product_{n>=1} (a(n)+1)/a(n) = e, coming from Product_{n=1..N}(a(n)+1)/a(n) = Sum_{n=0..N} 1/n!. - Robert FERREOL, Jul 12 2018
O.g.f.: Sum_{k>=1} k^k*x^k/(1 + (k - 1)*x)^(k+1). - Ilya Gutkovskiy, Oct 09 2018

A002627 a(n) = n*a(n-1) + 1, a(0) = 0.

Original entry on oeis.org

0, 1, 3, 10, 41, 206, 1237, 8660, 69281, 623530, 6235301, 68588312, 823059745, 10699776686, 149796873605, 2246953104076, 35951249665217, 611171244308690, 11001082397556421, 209020565553572000, 4180411311071440001, 87788637532500240022
Offset: 0

Views

Author

Keywords

Comments

This sequence shares divisibility properties with A000522; each of the primes in A072456 divide only a finite number of terms of this sequence. - T. D. Noe, Jul 07 2005
Sum of the lengths of the first runs in all permutations of [n]. Example: a(3)=10 because the lengths of the first runs in the permutation (123),(13)2,(3)12,(2)13,(23)1 and (3)21 are 3,2,1,1,2 and 1, respectively (first runs are enclosed between parentheses). Number of cells in the last columns of all deco polyominoes of height n. A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column. a(n) = Sum_{k=1..n} k*A092582(n,k). - Emeric Deutsch, Aug 16 2006
Starting with offset 1 = eigensequence of an infinite lower triangular matrix with (1, 2, 3, ...) as the right border, (1, 1, 1, ...) as the left border, and the rest zeros. - Gary W. Adamson, Apr 27 2009
Sums of rows of the triangle in A173333, n > 0. - Reinhard Zumkeller, Feb 19 2010
if s(n) is a sequence defined as s(0) = x, s(n) = n*s(n-1)+k, n > 0 then s(n) = n!*x + a(n)*k. - Gary Detlefs, Feb 20 2010
Number of arrangements of proper subsets of n distinct objects, i.e., arrangements which are not permutations (where the empty set is considered a proper subset of any nonempty set); see example. - Daniel Forgues, Apr 23 2011
For n >= 0, A002627(n+1) is the sequence of sums of Pascal-like triangle with one side 1,1,..., and the other side A000522. - Vladimir Shevelev, Feb 06 2012
a(n) = q(n,1) for n >= 1, where the polynomials q are defined at A248669. - Clark Kimberling, Oct 11 2014
a(n) is the number of quasilinear weak orderings on {1,...,n}. - J. Devillet, Dec 22 2017

Examples

			[a(0), a(1), ...] = GAMMA(m+1,1)*exp(1) - GAMMA(m+1) = [exp(-1)*exp(1)-1, 2*exp(-1)*exp(1)-1, 5*exp(-1)*exp(1)-2, 16*exp(-1)*exp(1)-6, 65*exp(-1)*exp(1)-24, 326*exp(-1)*exp(1)-120, ...]. - _Stephen Crowley_, Jul 24 2009
From _Daniel Forgues_, Apr 25 2011: (Start)
  n=0: {}: #{} = 0
  n=1: {1}: #{()} = 1
  n=2: {1,2}: #{(),(1),(2)} = 3
  n=3: {1,2,3}: #{(),(1),(2),(3),(1,2),(2,1),(1,3),(3,1),(2,3),(3,2)} = 10
(End)
x + 3*x^2 + 10*x^3 + 41*x^4 + 206*x^5 + 1237*x^6 + 8660*x^7 + 69281*x^8 + ...
		

References

  • D. Singh, The numbers L(m,n) and their relations with prepared Bernoulli and Eulerian numbers, Math. Student, 20 (1952), 66-70.
  • 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

Second diagonal of A059922, cf. A056542.
Conjectured to give records in A130147.

Programs

  • Haskell
    a002627 n = a002627_list !! n
    a002627_list = 0 : map (+ 1) (zipWith (*) [1..] a002627_list)
    -- Reinhard Zumkeller, Mar 24 2013
    
  • Magma
    I:=[1]; [0] cat [n le 1 select I[n] else n*Self(n-1)+1:n in [1..21]]; // Marius A. Burtea, Aug 07 2019
  • Maple
    A002627 := proc(n)
        add( (n-j)!*binomial(n,j), j=1..n) ;
    end proc:
    seq(A002627(n),n=0..21) ; # Zerinvary Lajos, Jul 31 2006
  • Mathematica
    FoldList[ #1*#2 + 1 &, 0, Range[21]] (* Robert G. Wilson v, Oct 11 2005 *)
    RecurrenceTable[{a[0]==0,a[n]==n*a[n-1]+1},a,{n,30}] (* Harvey P. Dale, Mar 29 2015 *)
  • Maxima
    makelist(sum(n!/k!,k,1,n),n,0,40); /* Emanuele Munarini, Jun 20 2014 */
    
  • PARI
    a(n)= n!*sum(k=1,n, 1/k!); \\ Joerg Arndt, Apr 24 2011
    

Formula

a(n) = n! * Sum_{k=1..n} 1/k!.
a(n) = A000522(n) - n!. - Michael Somos, Mar 26 1999
a(n) = floor( n! * (e-1) ), n >= 1. - Amarnath Murthy, Mar 08 2002
E.g.f.: (exp(x)-1)/(1-x). - Mario Catalani (mario.catalani(AT)unito.it), Feb 06 2003
Binomial transform of A002467. - Ross La Haye, Sep 21 2004
a(n) = Sum_{j=1..n} (n-j)!*binomial(n,j). - Zerinvary Lajos, Jul 31 2006
a(n) = 1 + Sum_{k=0..n-1} k*a(k). - Benoit Cloitre, Jul 26 2008
a(m) = Integral_{s=0..oo} ((1+s)^m - s^m)*exp(-s) = GAMMA(m+1,1) * exp(1) - GAMMA(m+1). - Stephen Crowley, Jul 24 2009
From Sergei N. Gladkovskii, Jul 05 2012: (Start)
a(n+1) = A000522(n) + A001339(n) - A000142(n+1);
E.g.f.: Q(0)/(1-x), where Q(k)= 1 + (x-1)*k!/(1 - x/(x + (x-1)*(k+1)!/Q(k+1))); (continued fraction). (End)
E.g.f.: x/(1-x)*E(0)/2, where E(k)= 1 + 1/(1 - x/(x + (k+2)/E(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 01 2013
1/(e - 1) = 1 - 1!/(1*3) - 2!/(3*10) - 3!/(10*41) - 4!/(41*206) - ... (see A056542 and A185108). - Peter Bala, Oct 09 2013
Conjecture: a(n) + (-n-1)*a(n-1) + (n-1)*a(n-2) = 0. - R. J. Mathar, Feb 16 2014
The e.g.f. f(x) = (exp(x)-1)/(1-x) satisfies the differential equation: (1-x)*f'(x) - (2-x)*f(x) + 1, from which we can obtain the recurrence:
a(n+1) = a(n) + n! + Sum_{k=1..n} (n!/k!)*a(k). The above conjectured recurrence can be obtained from the original recurrence or from the differential equation satisfied by f(x). - Emanuele Munarini, Jun 20 2014
Limit_{n -> oo} a(n)/n! = exp(1) - 1. - Carmine Suriano, Jul 01 2015
Product_{n>=2} a(n)/(a(n)-1) = exp(1) - 1. See A091131. - James R. Buddenhagen, Jul 21 2019
a(n) = Sum_{k=0..n-1} k!*binomial(n,k). - Ridouane Oudra, Jun 17 2025

Extensions

Comments from Michael Somos

A010027 Triangle read by rows: T(n,k) is the number of permutations of [n] having k consecutive ascending pairs (0 <= k <= n-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 9, 11, 1, 4, 18, 44, 53, 1, 5, 30, 110, 265, 309, 1, 6, 45, 220, 795, 1854, 2119, 1, 7, 63, 385, 1855, 6489, 14833, 16687, 1, 8, 84, 616, 3710, 17304, 59332, 133496, 148329, 1, 9, 108, 924, 6678, 38934, 177996, 600732, 1334961, 1468457, 1
Offset: 1

Views

Author

Keywords

Comments

A "consecutive ascending pair" in a permutation p_1, p_2, ..., p_n is a pair p_i, p_{i+1} = p_i + 1.
From Emeric Deutsch, May 15 2010: (Start)
The same triangle, but with rows indexed differently, also arises as follows: U(n,k) = number of permutations of [n] having k blocks (1 <= k <= n), where a block of a permutation is a maximal sequence of consecutive integers which appear in consecutive positions. For example, the permutation 5412367 has 4 blocks: 5, 4, 123, and 67.
When seen as coefficients of polynomials with decreasing exponents: evaluations are A001339 (x=2), A081923 (x=3), A081924 (x=4), A087981 (x=-1).
The sum of the entries in row n is n!.
U(n,n) = A000255(n-1) = d(n-1) + d(n), U(n,n-1)=d(n), where d(j)=A000166(j) (derangement numbers). (End)
This is essentially the reversal of the exponential Riordan array [exp(-x)/(1-x)^2,x] (cf. A123513). - Paul Barry, Jun 17 2010
U(n-1, k-2) * n*(n-1)/k = number of permutations of [n] with k elements not fixed by the permutation. - Michael Somos, Aug 19 2018

Examples

			Triangle starts:
  1;
  1, 1;
  1, 2,   3;
  1, 3,   9,  11;
  1, 4,  18,  44,   53;
  1, 5,  30, 110,  265,   309;
  1, 6,  45, 220,  795,  1854,   2119;
  1, 7,  63, 385, 1855,  6489,  14833,  16687;
  1, 8,  84, 616, 3710, 17304,  59332, 133496,  148329;
  1, 9, 108, 924, 6678, 38934, 177996, 600732, 1334961, 1468457;
  ...
For n=3, the permutations 123, 132, 213, 231, 312, 321 have respectively 2,0,0,1,1,0 consecutive ascending pairs, so row 3 of the triangle is 3,2,1. - _N. J. A. Sloane_, Apr 12 2014
In the alternative definition, T(4,2)=3 because we have 234.1, 4.123, and 34.12 (the blocks are separated by dots). - _Emeric Deutsch_, May 16 2010
		

References

  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.

Crossrefs

Diagonals, reading from the right-hand edge: A000255, A000166, A000274, A000313, A001260, A001261. A045943 is another diagonal.
Cf. A123513 (mirror image).
A289632 is the analogous triangle with the additional restriction that all consecutive pairs must be isolated, i.e., must not be back-to-back to form longer consecutive sequences.

Programs

  • Maple
    U := proc (n, k) options operator, arrow: factorial(k+1)*binomial(n, k)*(sum((-1)^i/factorial(i), i = 0 .. k+1))/n end proc: for n to 10 do seq(U(n, k), k = 1 .. n) end do; # yields sequence in triangular form; # Emeric Deutsch, May 15 2010
  • Mathematica
    t[n_, k_] := Binomial[n, k]*Subfactorial[k+1]/n; Table[t[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 07 2014, after Emeric Deutsch *)
    T[0,0]:=0; T[1,1]:=1; T[n_,n_]:=T[n,n]=(n-1)T[n-1,n-1]+(n-2)T[n-2,n-2]; T[n_,k_]:=T[n,k]=T[n-1,k] (n-1)/(n-k); Flatten@Table[T[n,k],{n,1,10},{k,1,n}] (* Oliver Seipel, Dec 01 2024 *)

Formula

E.g.f.: exp(x*(y-1))/(1-x)^2. - Vladeta Jovovic, Jan 03 2003
From Emeric Deutsch, May 15 2010: (Start)
U(n,k) = binomial(n-1,k-1)*(k-1)!*Sum_{j=0..k-1} (-1)^(k-j-1)*(j+1)/(k-j-1)! (1 <= k <= n).
U(n,k) = (k+1)!*binomial(n,k)*(1/n)*Sum_{i=0..k+1} (-1)^i/i!.
U(n,k) = (1/n)*binomial(n,k)*d(k+1), where d(j)=A000166(j) (derangement numbers). (End)

Extensions

More terms from Vladeta Jovovic, Jan 03 2003
Original definition from David, Kendall and Barton restored by N. J. A. Sloane, Apr 12 2014

A335548 Number of compositions of n with at least one non-contiguous value.

Original entry on oeis.org

0, 0, 0, 0, 1, 4, 10, 28, 68, 159, 350, 770, 1642, 3468, 7218, 14870, 30463, 62044, 125818, 254302, 512690, 1031284, 2071858, 4157214, 8334742, 16699103, 33442208, 66947772, 133986940, 268107104, 536404872, 1073082978, 2146555516, 4293665006, 8588112822
Offset: 0

Views

Author

Gus Wiseman, Jul 08 2020

Keywords

Comments

Also the number of compositions of n matching the pattern (1,2,1) or (2,1,2).

Examples

			The a(4) = 1 through a(6) = 10 compositions:
  (121)  (131)   (141)
         (212)   (1131)
         (1121)  (1212)
         (1211)  (1221)
                 (1311)
                 (2112)
                 (2121)
                 (11121)
                 (11211)
                 (12111)
		

Crossrefs

The complement is A274174.
The version for prime indices is A335460.
Anti-run compositions are A003242.
(1,2,1) and (2,1,2)-matching permutations of prime indices are A335462.
(1,2,1)-matching compositions are A335470.
(1,2,1)-avoiding compositions are A335471.
(2,1,2)-matching compositions are A335472.
(2,1,2)-avoiding compositions are A335473.

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
           add(b(n-i*j, i-1, p+`if`(j=0, 0, 1)), j=0..n/i)))
        end:
    a:= n-> ceil(2^(n-1))-b(n$2, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jul 09 2020
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[Split[#]]>Length[Union[#]]&]],{n,0,10}]
    (* Second program: *)
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i<1, 0,
         Sum[b[n-i*j, i-1, p + If[j == 0, 0, 1]], {j, 0, n/i}]]];
    a[n_] := Ceiling[2^(n-1)] - b[n, n, 0];
    a /@ Range[0, 50] (* Jean-François Alcover, May 21 2021, after Alois P. Heinz *)

Formula

a(n) = A011782(n) - A274174(n). - Alois P. Heinz, Jul 09 2020

Extensions

More terms from Alois P. Heinz, Jul 09 2020

A094816 Triangle read by rows: T(n,k) are the coefficients of Charlier polynomials: A046716 transposed, for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 8, 6, 1, 1, 24, 29, 10, 1, 1, 89, 145, 75, 15, 1, 1, 415, 814, 545, 160, 21, 1, 1, 2372, 5243, 4179, 1575, 301, 28, 1, 1, 16072, 38618, 34860, 15659, 3836, 518, 36, 1, 1, 125673, 321690, 318926, 163191, 47775, 8274, 834, 45, 1, 1, 1112083, 2995011
Offset: 0

Views

Author

Philippe Deléham, Jun 12 2004

Keywords

Comments

The a-sequence for this Sheffer matrix is A027641(n)/A027642(n) (Bernoulli numbers) and the z-sequence is A130189(n)/ A130190(n). See the W. Lang link.
Take the lower triangular matrix in A049020 and invert it, then read by rows! - N. J. A. Sloane, Feb 07 2009
Exponential Riordan array [exp(x), log(1/(1-x))]. Equal to A007318*A132393. - Paul Barry, Apr 23 2009
A signed version of the triangle appears in [Gessel]. - Peter Bala, Aug 31 2012
T(n,k) is the number of permutations over all subsets of {1,2,...,n} (Cf. A000522) that have exactly k cycles. T(3,2) = 6: We permute the elements of the subsets {1,2}, {1,3}, {2,3}. Each has one permutation with 2 cycles. We permute the elements of {1,2,3} and there are three permutations that have 2 cycles. 3*1 + 1*3 = 6. - Geoffrey Critzer, Feb 24 2013
From Wolfdieter Lang, Jul 28 2017: (Start)
In Chihara's book the row polynomials (with rising powers) are the Charlier polynomials (-1)^n*C^(a)_n(-x), with a = -1, n >= 0. See p. 170, eq. (1.4).
In Ismail's book the present Charlier polynomials are denoted by C_n(-x;a=1) on p. 177, eq. (6.1.25). (End)
The triangle T(n,k) is a representative of the parametric family of triangles T(m,n,k), whose columns are the coefficients of the standard expansion of the function f(x) = (-log(1-x))^(k)*exp(-m*x)/k! for the case m=-1. See A381082. - Igor Victorovich Statsenko, Feb 14 2025

Examples

			From _Paul Barry_, Apr 23 2009: (Start)
Triangle begins
  1;
  1,     1;
  1,     3,     1;
  1,     8,     6,     1;
  1,    24,    29,    10,     1;
  1,    89,   145,    75,    15,    1;
  1,   415,   814,   545,   160,   21,   1;
  1,  2372,  5243,  4179,  1575,  301,  28,  1;
  1, 16072, 38618, 34860, 15659, 3836, 518, 36, 1;
Production matrix is
  1, 1;
  0, 2, 1;
  0, 1, 3,  1;
  0, 1, 3,  4,  1;
  0, 1, 4,  6,  5,  1;
  0, 1, 5, 10, 10,  6,  1;
  0, 1, 6, 15, 20, 15,  7,  1;
  0, 1, 7, 21, 35, 35, 21,  8, 1;
  0, 1, 8, 28, 56, 70, 56, 28, 9, 1; (End)
		

References

  • T. S. Chihara, An Introduction to Orthogonal Polynomials, Gordon and Breach, New York, London, Paris, 1978, Ch. VI, 1., pp. 170-172.
  • Classical and Quantum Orthogonal Polynomials in One Variable, Cambridge University Press, 2005, EMA, Vol. 98, p. 177.

Crossrefs

Columns k=0..4 give A000012, A002104, A381021, A381022, A381023.
Diagonals: A000012, A000217.
Row sums A000522, alternating row sums A024000.
KummerU(-n,1-n-x,z): this sequence (z=1), |A137346| (z=2), A327997 (z=3).

Programs

  • Maple
    A094816 := (n,k) -> (-1)^(n-k)*add(binomial(-j-1,-n-1)*Stirling1(j,k), j=0..n):
    seq(seq(A094816(n, k), k=0..n), n=0..9); # Peter Luschny, Apr 10 2016
  • Mathematica
    nn=10;f[list_]:=Select[list,#>0&];Map[f,Range[0,nn]!CoefficientList[Series[ Exp[x]/(1-x)^y,{x,0,nn}],{x,y}]]//Grid  (* Geoffrey Critzer, Feb 24 2013 *)
    Flatten[Table[(-1)^(n-k) Sum[Binomial[-j-1,-n-1] StirlingS1[j,k],{j,0,n}], {n,0,9},{k,0,n}]] (* Peter Luschny, Apr 10 2016 *)
    p[n_] := HypergeometricU[-n, 1 - n - x, 1];
    Table[CoefficientList[p[n], x], {n,0,9}] // Flatten (* Peter Luschny, Oct 27 2019 *)
  • PARI
    {T(n, k)= local(A); if( k<0 || k>n, 0, A = x * O(x^n); polcoeff( n! * polcoeff( exp(x + A) / (1 - x + A)^y, n), k))} /* Michael Somos, Nov 19 2006 */
    
  • Sage
    def a_row(n):
        s = sum(binomial(n,k)*rising_factorial(x,k) for k in (0..n))
        return expand(s).list()
    [a_row(n) for n in (0..9)] # Peter Luschny, Jun 28 2019

Formula

E.g.f.: exp(t)/(1-t)^x = Sum_{n>=0} C(x,n)*t^n/n!.
Sum_{k = 0..n} T(n, k)*x^k = C(x, n), Charlier polynomials; C(x, n)= A024000(n), A000012(n), A000522(n), A001339(n), A082030(n), A095000(n), A095177(n), A096307(n), A096341(n), A095722(n), A095740(n) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively. - Philippe Deléham, Feb 27 2013
T(n+1, k) = (n+1)*T(n, k) + T(n, k-1) - n*T(n-1, k) with T(0, 0) = 1, T(0, k) = 0 if k>0, T(n, k) = 0 if k<0.
PS*A008275*PS as infinite lower triangular matrices, where PS is a triangle with PS(n, k) = (-1)^k*A007318(n, k). PS = 1/PS. - Gerald McGarvey, Aug 20 2009
T(n,k) = (-1)^(n-k)*Sum_{j=0..n} C(-j-1, -n-1)*S1(j, k) where S1 are the signed Stirling numbers of the first kind. - Peter Luschny, Apr 10 2016
Absolute values T(n,k) of triangle (-1)^(n+k) T(n,k) where row n gives coefficients of x^k, 0 <= k <= n, in expansion of Sum_{k=0..n} binomial(n,k) (-1)^(n-k) x^{(k)}, where x^{(k)} := Product_{i=0..k-1} (x-i), k >= 1, and x^{(0)} := 1, the falling factorial powers. - Daniel Forgues, Oct 13 2019
From Peter Bala, Oct 23 2019: (Start)
The n-th row polynomial is
R(n, x) = Sum_{k = 0..n} (-1)^k*binomial(n, k)*k! * binomial(-x, k).
These polynomials occur in series acceleration formulas for the constant
1/e = n! * Sum_{k >= 0} (-1)^k/(k!*R(n,k)*R(n,k+1)), n >= 0. (cf. A068985, A094816 and A137346). (End)
R(n, x) = KummerU[-n, 1 - n - x, 1]. - Peter Luschny, Oct 27 2019
Sum_{j=0..m} (-1)^(m-j) * Bell(n+j) * T(m,j) = m! * Sum_{k=0..n} binomial(k,m) * Stirling2(n,k). - Vaclav Kotesovec, Aug 06 2021
From Natalia L. Skirrow, Jun 11 2025: (Start)
G.f.: 2F0(1,y;x/(1-x)) / (1-x).
Polynomial for the n-th row is R(n,y) = 2F0(-n,y;-1).
Falling g.f. for n-th row: Sum_{k=0..n} a(n,k)*(y)_k = [x^0] 2F0(1,-n;-1/x) * (1+log(1/(1-x)))^y = [x^n] e^x * Gamma(n+1,x) * (1+log(1/(1-x)))^y, where (y)_k = y!/(y-k)! denotes the falling factorial. (End)

A132382 Lower triangular array T(n,k) generator for group of arrays related to A001147 and A102625.

Original entry on oeis.org

1, -1, 1, -1, -2, 1, -3, -3, -3, 1, -15, -12, -6, -4, 1, -105, -75, -30, -10, -5, 1, -945, -630, -225, -60, -15, -6, 1, -10395, -6615, -2205, -525, -105, -21, -7, 1, -135135, -83160, -26460, -5880, -1050, -168, -28, -8, 1, -2027025, -1216215, -374220, -79380, -13230, -1890, -252, -36, -9, 1
Offset: 0

Views

Author

Tom Copeland, Nov 11 2007, Nov 12 2007, Nov 19 2007, Dec 04 2007, Dec 06 2007

Keywords

Comments

Let b(n) = LPT[ A001147 ] = -A001147(n-1) for n > 0 and 1 for n=0, where LPT represents the action of the list partition transform described in A133314.
Then T(n,k) = binomial(n,k) * b(n-k) .
Form the matrix of polynomials TB(n,k,t) = T(n,k) * t^(n-k) = binomial(n,k) * b(n-k) * t^(n-k) = binomial(n,k) * Pb(n-k,t),
beginning as
1;
-1, 1;
-1*t, -2, 1;
-3*t^2, -3*t, -3, 1;
-15*t^3, -12*t^2, -6*t, -4, 1;
-105*t^4, -75*t^3, -30*t^2, -10*t, -5, 1;
Let Pc(n,t) = LPT(Pb(.,t)).
Then [TB(t)]^(-1) = TC(t) = [ binomial(n,k) * Pc(n-k,t) ] = LPT(TB),
whose first column is
Pc(0,t) = 1
Pc(1,t) = 1
Pc(2,t) = 2 + t
Pc(3,t) = 6 + 6*t + 3*t^2
Pc(4,t) = 24 + 36*t + 30*t^2 + 15*t^3
Pc(5,t) = 120 + 240*t + 270*t^2 + 210*t^3 + 105*t^4.
The coefficients of these polynomials are given by the reverse of A102625 with the highest order coefficients given by A001147 with an additional leading 1.
Note this is not the complete matrix TC. The complete matrix is formed by multiplying along the diagonal of the lower triangular Pascal matrix by these polynomials, embedding trees of coefficients in the matrix.
exp[Pb(.,t)*x] = 1 + [(1-2t*x)^(1/2) - 1] / (t-0) = [1 + a finite diff. of [(1-2t*x)^(1/2)] with step t] = e.g.f. of the first column of TB.
exp[Pc(.,t)*x] = 1 / { 1 + [(1-2t*x)^(1/2) - 1] / t } = 1 / exp[Pb(.,t)*x) = e.g.f. of the first column of TC.
TB(t) and TC(t), being inverse to each other, are the generators of an Abelian group.
TB(0) and TC(0) are generators for a subgroup representing the iterated Laguerre operator described in A132013 and A132014.
Let sb(t,m) and sc(t,m) be the associated sequences under the LPT to TB(t)^m = B(t,m) and TC(t)^m = C(t,m).
Let Esb(t,m) and Esc(t,m) be e.g.f.'s for sb(t,m) and sc(t,m), rB(t,m) and rC(t,m) be the row sums of B(t,m) and C(t,m) and aB(t,m) and aC(t,m) be the alternating row sums.
Then B(t,m) is the inverse of C(t,m), Esb(t,m) is the reciprocal of Esc(t,m) and sb(t,m) and sc(t,m) form a reciprocal pair under the LPT. Similar relations hold among the row sums and the alternating sign row sums and associated quantities.
All the group members have the form B(t,m) * C(u,p) = TB(t)^m * TC(u)^p = [ binomial(n,k) * s(n-k) ]
with associated e.g.f. Es(x) = exp[m * Pb(.,t) * x] * exp[p * Pc(.,u) * x] for the first column of the matrix, with terms s(n), so group multiplication is isomorphic to matrix multiplication and to multiplication of the e.g.f.'s for the associated sequences (see examples).
These results can be extended to other groups of integer-valued arrays by replacing the 2 by any natural number in the expression for exp[Pb(.,t)*x].
More generally,
[ G.f. for M = Product_{i=0..j} B[s(i),m(i)] * C[t(i),n(i)] ]
= exp(u*x) * Product_{i=0..j} { exp[m(i) * Pb(.,s(i)) * x] * exp[n(i) * Pc(.,t(i)) * x] }
= exp(u*x) * Product_{i=0..j} { 1 + [ (1 - 2*s(i)*x)^(1/2) - 1 ] / s(i) }^m(i) / { 1 + [ (1 - 2*t(i)*x)^(1/2) - 1 ] / t(i) }^n(i)
= exp(u*x) * H(x)
[ E.g.f. for M ] = I_o[2*(u*x)^(1/2)] * H(x).
M is an integer-valued matrix for m(i) and n(i) positive integers and s(i) and t(i) integers. To invert M, change B to C in Product for M.
H(x) is the e.g.f. for the first column of M and diagonally multiplying the Pascal matrix by the terms of this column generates M. See examples.
The G.f. for M, i.e., the e.g.f. for the row polynomials of M, implies that the row polynomials form an Appell sequence (see Wikipedia and Mathworld). - Tom Copeland, Dec 03 2013

Examples

			Some group members and associated arrays are
(t,m) :: Array :: Asc. Matrix :: Asc. Sequence :: E.g.f. for sequence
..............................................................................
(0,1).::.B..::..A132013.::.(1,-1,0,0,0,0,...).....::.s(x).=.1-x
(0,1).::.C..::..A094587.::.(0!,1!,2!,3!,...)......::.1./.s(x)
(0,1).::.rB.::.~A055137.::.(1,0,-1,-2,-3,-4,...)..::.exp(x).*.s(x)
(0,1).::.rC.::....-.....::..A000522...............::.exp(x)./.s(x)
(0,1).::.aB.::....-.....::.(1,-2,3,-4,5,-6,...)...::.exp(-x).*.s(x)
(0,1).::.aC.::..A008290.::..A000166...............::.exp(-x)./.s(x)
..............................................................................
(0,2).::.B..::..A132014.::.(1,-2,2,0,0,0,0...)....::.s(x).=.(1-x)^2
(0,2).::.C..::..A132159.::.(1!,2!,3!,4!,...)......::..1./.s(x).
(0,2).::.rB.::...-......::.(1,-1,-1,1,5,11,19,29,)::.exp(x).*.s(x).
(0,2).::.rC.::...-......::..A001339...............::.exp(x)./.s(x).
(0,2).::.aB.::...-......::.(-1)^n.A002061(n+1)....::.exp(-x).*.s(x).
(0,2).::.aC.::...-......::..A000255...............::.exp(-x)./.s(x).
..............................................................................
(1,1).::.B..::..T.......::.(1,-A001147(n-1))......::.s(x).=.(1-2x)^(1/2)
(1,1).::.C..::.~A113278.::..A001147...............::.1./.s(x)...
(1,1).::.rB.::...-......::..A055142...............::.exp(x).*.s(x).
(1,1).::.rC.::...-......::..A084262...............::.exp(x)./.s(x).
(1,1).::.aB.::...-......::.(1,-2,2,-4,-4,-56,...).::.exp(-x).*.s(x).
(1,1).::.aC.::...-......::..A053871...............::.exp(-x)./.s(x).
..............................................................................
(2,1).::.B..::...-......::.(1,-A001813)...........::.s=[1+(1-4x)^(1/2)]/2....
(2,1).::.C..::...-......::..A001761...............::.1./.s(x)..
(2,1).::.rB.::...-......::.(1,0,-3,-20,-183,...)..::.exp(x).*.s(x)..
(2,1).::.rC.::...-......::.(1,2,7,46,485,...).....::.exp(x)./.s(x).
(2,1).::.aB.::...-......::.(1,-2,1,-10,-79,...)...::.exp(-x).*.s(x).
(2,1).::.aC.::...-......::.(1,0,3,20,237,...).....::.exp(-x)./.s(x)
..............................................................................
(1,2).::.B..::.~A134082.::.(1,-2,0,0,0,0,...).....::.s(x).=.1.-.2x
(1,2).::.C..::....-.....::..A000165...............::.1./.s(x)..
(1,2).::.rB.::....-.....::.(1,-1,-3,-5,-7,-9,...).::.exp(x).*.s(x).
(1,2).::.rC.::....-.....::..A010844...............::.exp(x)./.s(x)..
(1,2).::.aB.::....-.....::.(1,-3,5,-7,9,-11,...)..::.exp(-x).*.s(x).
(1,2).::.aC.::....-.....::..A000354...............::.exp(-x)./.s(x).
..............................................................................
(The tilde indicates the match is not exact--specifically, there are differences in signs from the true matrices.)
Note the row sums correspond to binomial transforms of s(x) and the alternating row sums, to inverse binomial transforms, or, finite differences.
Some additional examples:
C(1,2)*B(0,1) = B(1,-2)*C(0,-1) = [ binomial(n,k)*A002866(n-k) ] with asc. e.g.f. (1-x) / (1-2x).
B(1,2)*C(0,1) = C(1,-2)*B(0,-1) = 2I - A094587 with asc. e.g.f. (1-2x) / (1-x).
		

Formula

[G.f. for TB(n,k,t)] = GTB(u,x,t) = exp(u*x) * { 1 + [ (1 - 2t*x)^(1/2) - 1 ] / t } = exp[(u+Pb(.,t))*x] where TB(n,k,t) = (D_x)^n (D_u)^k /k! GTB(u,x,t) eval. at u=x=0.
[G.f. for TC(n,k,t)] = GTC(u,x,t) = exp(u*x) / { 1 + [ (1 - 2t*x)^(1/2) - 1 ] / t } = exp[(u+Pc(.,t))*x] where TC(n,k,t) = (D_x)^n (D_u)^k /k! GTC(u,x,t) eval. at u=x=0.
[E.g.f. for TB(n,k,t)] = I_o[2*(u*x)^(1/2)] * { 1 + [ (1 - 2t*x)^(1/2) - 1 ] / t } and
[E.g.f. for TC(n,k,t)] = I_o[2*(u*x)^(1/2)] / { 1 + [ (1 - 2t*x)^(1/2) - 1 ] / t }
where I_o is the zeroth modified Bessel function of the first kind, i.e.,
I_o[2*(u*x)^(1/2)] = Sum_{j>=0} (u^j/j!) * (x^j/j!).
So [e.g.f. for TB(n,k)] = I_o[2*(u*x)^(1/2)] * (1 - 2x)^(1/2).

Extensions

More terms from Tom Copeland, Dec 05 2007

A046716 Coefficients of a special case of Poisson-Charlier polynomials.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 8, 1, 1, 10, 29, 24, 1, 1, 15, 75, 145, 89, 1, 1, 21, 160, 545, 814, 415, 1, 1, 28, 301, 1575, 4179, 5243, 2372, 1, 1, 36, 518, 3836, 15659, 34860, 38618, 16072, 1, 1, 45, 834, 8274, 47775, 163191, 318926, 321690, 125673, 1, 1, 55, 1275, 16290, 125853, 606417, 1809905, 3197210, 2995011, 1112083, 1
Offset: 0

Views

Author

Keywords

Comments

Diagonals: A000012, A000217; A000012, A002104. - Philippe Deléham, Jun 12 2004
The sequence a(n) = Sum_{k = 0..n} T(n,k)*x^(n-k) is the binomial transform of the sequence b(n) = (n+x-1)! / (x-1)!. - Philippe Deléham, Jun 18 2004

Examples

			Triangle starts:
  1;
  1,  1;
  1,  3,   1;
  1,  6,   8,    1;
  1, 10,  29,   24,     1;
  1, 15,  75,  145,    89,     1;
  1, 21, 160,  545,   814,   415,     1;
  1, 28, 301, 1575,  4179,  5243,  2372,     1;
  1, 36, 518, 3836, 15659, 34860, 38618, 16072,   1;
		

Crossrefs

Diagonals include: A000012, A000217, A002104.
Sums include: A000522 (row), A001339, A023443 (alternating sign row), A082030, A081367.

Programs

  • Magma
    A046716:= func< n,k | (&+[(-1)^j*Binomial(n,k-j)*StirlingFirst(j+n-k, n-k): j in [0..k]]) >;
    [A046716(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 31 2024
    
  • Maple
    a := proc(n,k) option remember;
       if k = 0 then 1
    elif k < 0 then 0
    elif k = n then (-1)^n
    else a(n-1,k) - n*a(n-1,k-1) - (n-1)*a(n-2,k-2) fi end:
    A046716 := (n,k) -> abs(a(n,k));
    seq(seq(A046716(n,k),k=0..n),n=0..9); # Peter Luschny, Apr 05 2011
  • Mathematica
    t[, 0] = 1; t[n, k_] := (-1)^k*Sum[(-1)^i*Binomial[n, i]*StirlingS1[i, n-k], {i, n-k, n}]; Table[t[n, k] // Abs, {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 10 2014 *)
    T[n_, k_]:= T[n,k]= If[k<0 || k>n, 0, If[k==0 || k==n, 1, T[n-1,k] +n*T[n-1,k-1] - (n-1)*T[n-2,k-2]]];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jul 31 2024 *)
  • SageMath
    def A046716(n, k): return sum(binomial(n, k-j)*stirling_number1(j+n-k, n-k) for j in range(k+1))
    flatten([[A046716(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 31 2024

Formula

Enneking and Ahuja reference gives the recurrence t(n, k) = t(n-1, k) - n*t(n-1, k-1) - (n-1)*t(n-2, k-2), with t(n, 0) = 1 and t(n, n) = (-1)^n. This sequence is T(n, k) = (-1)^k * t(n, k).
Sum_{k = 0..n} T(n, k)*x^(n-k) = A000522(n), A001339(n), A082030(n) for x = 1, 2, 3 respectively.
Sum_{k = 0..n} T(n, k)*2^k = A081367(n). - Philippe Deléham, Jun 12 2004
Let P(x, n) = Sum_{k = 0..n} T(n, k)*x^k, then Sum_{n>=0} P(x, n)*t^n / n! = exp(xt)/(1-xt)^(1/x). - Philippe Deléham, Jun 12 2004
T(n, 0) = 1, T(n, k) = (-1)^k * Sum_{i=n-k..n} (-1)^i*C(n, i)*S1(i, n-k), where S1 = Stirling numbers of first kind (A008275).
From G. C. Greubel, Jul 31 2024: (Start)
T(n, k) = T(n-1, k) + n*T(n-1, k-1) - (n-1)*T(n-2, k-2), with T(n, 0) = T(n, n) = 1.
Sum_{k=0..n} (-1)^k*T(n, k) = (-1)^(n+1)*A023443(n). (End)

Extensions

More terms from Vladeta Jovovic, Jun 15 2004
Showing 1-10 of 70 results. Next