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 43 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

A263779 Number of inversion sequences avoiding pattern 010.

Original entry on oeis.org

1, 1, 2, 5, 15, 53, 215, 979, 4922, 26992, 159958, 1016784, 6890723, 49534501, 376081602, 3004503758, 25175290576, 220624253707, 2017049937115, 19195118759579, 189758808470023, 1945188215493411, 20642140342300062, 226427702583430619, 2563833140546044096
Offset: 0

Views

Author

Michel Marcus, Oct 26 2015

Keywords

Crossrefs

Extensions

a(0), a(10)-a(17) from Alois P. Heinz, Dec 15 2016

A138265 Number of upper triangular zero-one matrices with n ones and no zero rows or columns.

Original entry on oeis.org

1, 1, 1, 2, 5, 16, 61, 271, 1372, 7795, 49093, 339386, 2554596, 20794982, 182010945, 1704439030, 17003262470, 180011279335, 2015683264820, 23801055350435, 295563725628564, 3850618520827590, 52514066450469255, 748191494586458700, 11115833059268126770
Offset: 0

Views

Author

Vladeta Jovovic, Mar 10 2008, Mar 11 2008

Keywords

Comments

Row sums of A193357.
This is also the number of rigid unlabeled interval orders with n points (see Brightwell-Keller, Theorem 2; or Dukes-Kitaev-Remmel-Steingrímsson, Theorem 8). - N. J. A. Sloane, Dec 04 2011 [Corrected by Vít Jelínek, Sep 04 2014.]
Number of length-n ascent sequences without flat steps (i.e., no two adjacent digits are equal). An ascent sequence is a sequence [d(1), d(2), ..., d(n)] where d(k)>=0 and d(k) <= 1 + asc([d(1), d(2), ..., d(k-1)]) and asc(.) gives the number of ascents of its argument. [Joerg Arndt, Nov 05 2012]

Examples

			From _Joerg Arndt_, Nov 05 2012: (Start)
The a(4) = 5 such matrices with 4 ones are (dots for zeros):
  1 . . .      1 1 .      1 . 1      1 1 .      1 . .
  . 1 . .      . . 1      . 1 .      . 1 .      . 1 1
  . . 1 .      . . 1      . . 1      . . 1      . . 1
  . . . 1
The a(5)=16 ascent sequences without flat steps are (dots for zeros):
  [ 1]   [ . 1 . 1 . ]
  [ 2]   [ . 1 . 1 2 ]
  [ 3]   [ . 1 . 1 3 ]
  [ 4]   [ . 1 . 2 . ]
  [ 5]   [ . 1 . 2 1 ]
  [ 6]   [ . 1 . 2 3 ]
  [ 7]   [ . 1 2 . 1 ]
  [ 8]   [ . 1 2 . 2 ]
  [ 9]   [ . 1 2 . 3 ]
  [10]   [ . 1 2 1 . ]
  [11]   [ . 1 2 1 2 ]
  [12]   [ . 1 2 1 3 ]
  [13]   [ . 1 2 3 . ]
  [14]   [ . 1 2 3 1 ]
  [15]   [ . 1 2 3 2 ]
  [16]   [ . 1 2 3 4 ]
(End)
		

Crossrefs

Column k=0 of A242153.
Column k=1 of A264909.
Row sums of A137252.

Programs

  • Maple
    g:=sum(product(1-1/(1+x)^i,i=1..n),n=0..35): gser:=series(g,x=0,30): seq(coeff(gser,x,n),n=0..22);  # Emeric Deutsch, Mar 23 2008
    # second Maple program:
    b:= proc(n, i, t) option remember; `if`(n<1, 1, add(
         `if`(i=j, 0, b(n-1, j, t+`if`(j>i, 1, 0))), j=0..t+1))
        end:
    a:= n-> b(n-1, 0$2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 09 2012, Jan 14 2015
  • Mathematica
    max = 25; g = Sum[Product[1 - 1/(1 - x)^i, {i, 1, n}], {n, 0, max}]; gser = Series[g, {x, 0, max}]; a[n_] := SeriesCoefficient[gser, {x, 0, n}]; Table[a[n] // Abs, {n, 0, max-1}] (* Jean-François Alcover, Jan 24 2014, after Emeric Deutsch *)
  • Sage
    # Adaptation of the Maple program by Alois P. Heinz:
    @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):
        if n<1: return 1
        return sum((-1)^(n-k)*binomial(n-1, k-1)*b(k-1, 0, 0) for k in range(n+1))
    [a(n) for n in range(33)]
    # Joerg Arndt, Feb 26 2014

Formula

G.f.: Sum_{n>=0} (Product_{i=1..n} 1-1/(1+x)^i).
G.f.: Sum_{n>=0} (1+x)^(n+1)*Product_{i=1..n} (1-(1+x)^i)^2. Proved by Bringmann-Li-Rhoades, and by Andrews-Jelínek. - Vít Jelínek, Sep 04 2014
a(n) = (1/n!)*Sum_{k=0..n} Stirling1(n,k)*A079144(k). a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n-1,k-1)*A022493(k).
G.f.: B(x/(1+x)) where B(x) is the g.f. of A022493; g.f.: Q(0,u) where u=x/(1+x), Q(k,u) = 1 + (1 - (1-x)^(2*k+1))/(1 - (1-(1-x)^(2*k+2))/(1 -(1-x)^(2*k+2) + 1/Q(k+1,u) )); (continued fraction). - Sergei N. Gladkovskii, Oct 03 2013
Asymptotics (Brightwell and Keller, 2011): a(n) ~ 12*sqrt(3)/(exp(Pi^2/12)*Pi^(5/2)) * n!*sqrt(n)*(6/Pi^2)^n. - Vaclav Kotesovec, May 03 2014
From Vít Jelínek, Sep 04 2014: (Start)
For each m, a(5m+4) mod 5 = 0. Conjectured by Andrews-Sellers, and proved by Garvan (see Remark 1.4(ii) in Garvan's paper).
For each m, a(5m+1) mod 5 = a(5m+2) mod 5 = 3*a(5m+3) mod 5. Proved by Garvan (see (1.17) in Garvan's paper).
The limit a(n)/A022493(n) is equal to exp(-Pi^2/6). This corresponds to the asymptotic probability that a random unlabeled interval order is rigid (See Brightwell-Keller; or Jelínek, Fact 5.2). (End)
Conjectural g.f.: 1 + Sum_{n >= 0} n/(1+x)^(n+1) * (Product_{i = 1..n} 1 - 1/(1+x)^i). Cf. A194530. - Peter Bala, Aug 21 2023

Extensions

More terms from Emeric Deutsch, Mar 23 2008

A005321 Upper triangular n X n (0,1)-matrices with no zero rows or columns.

Original entry on oeis.org

1, 1, 2, 10, 122, 3346, 196082, 23869210, 5939193962, 2992674197026, 3037348468846562, 6189980791404487210, 25285903982959247885402, 206838285372171652078912306, 3386147595754801373061066905042, 110909859519858523995273393471390010
Offset: 0

Views

Author

Keywords

References

  • T. L. Greenough, Enumeration of interval orders without duplicated holdings, Preprint, circa 1976.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column sums of A137252.

Programs

  • Mathematica
    max = 14; f[x_] := Sum[ x^n*Product[ (2^i-1) / (1+(2^i-1)*x), {i, 1, n}], {n, 0, max}]; CoefficientList[ Series[ f[x], {x, 0, max}], x] (* Jean-François Alcover, Nov 23 2011, after Vladeta Jovovic *)
  • PARI
    a(n) = 1 + sum(k=2, n, binomial(n,k)*sum(i=2, k, (-1)^i*prod(j=i+1, k, 2^j - 1))); \\ Michel Marcus, Oct 13 2019

Formula

a(n) = Sum_{k=0..n} binomial(n,k)*A005327(k+1).
G.f.: Sum_{n >= 0} x^n*Product_{i = 1..n} ((2^i-1)/(1 + (2^i-1)*x)). - Vladeta Jovovic, Mar 10 2008
From Peter Bala, Jul 06 2017: (Start)
Two conjectural continued fractions for the o.g.f.:
1/(1 - x/(1 - x/(1 - 6*x/(1 - 9*x/(1 - 28*x/(1 - 49*x/(1 - ... - 2^(n-1)*(2^n - 1)*x/(1 - (2^n - 1)^2*x/(1 - ...)))))))));
1 + x/(1 - 2*x/(1 - 3*x/(1 - 12*x/(1 - 21*x/(1 - ... - 2^n*(2^n - 1)*x/(1 - (2^(n+1) - 1)*(2^n - 1)*x/(1 - ...))))))). Cf. A289314 and A289315. (End)
a(n) = (-1)^n*Sum_{k=0..n} qS2(n,k)*[k]!*(-1)^k, where qS2(n,k) is the triangle A139382, and [k]! is q-factorial, q=2. - Vladimir Kruchinin, Oct 10 2019
a(n) = 1 + Sum_{k=2..n} binomial(n,k)*Sum{i=2..k} (-1)^i*Product_{j=i+1..k} (2^j - 1). See Greenough. - Michel Marcus, Oct 13 2019

Extensions

More terms from Max Alekseyev, Apr 27 2010

A242153 Number T(n,k) of ascent sequences of length n with exactly k flat steps; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 2, 1, 0, 5, 6, 3, 1, 0, 16, 20, 12, 4, 1, 0, 61, 80, 50, 20, 5, 1, 0, 271, 366, 240, 100, 30, 6, 1, 0, 1372, 1897, 1281, 560, 175, 42, 7, 1, 0, 7795, 10976, 7588, 3416, 1120, 280, 56, 8, 1, 0, 49093, 70155, 49392, 22764, 7686, 2016, 420, 72, 9, 1, 0
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, May 05 2014

Keywords

Comments

In general, column k is asymptotic to Pi^(2*k-5/2) / (k! * 6^(k-2) * sqrt(3) * exp(Pi^2/12)) * (6/Pi^2)^n * n! * sqrt(n). - Vaclav Kotesovec, Aug 27 2014

Examples

			Triangle T(n,k) begins:
00:      1;
01:      1,     0;
02:      1,     1,     0;
03:      2,     2,     1,     0;
04:      5,     6,     3,     1,    0;
05:     16,    20,    12,     4,    1,    0;
06:     61,    80,    50,    20,    5,    1,   0;
07:    271,   366,   240,   100,   30,    6,   1,  0;
08:   1372,  1897,  1281,   560,  175,   42,   7,  1, 0;
09:   7795, 10976,  7588,  3416, 1120,  280,  56,  8, 1, 0;
10:  49093, 70155, 49392, 22764, 7686, 2016, 420, 72, 9, 1, 0;
...
The 15 ascent sequences of length 4 (dots denote zeros) with their number of flat steps are:
01:  [ . . . . ]   3
02:  [ . . . 1 ]   2
03:  [ . . 1 . ]   1
04:  [ . . 1 1 ]   2
05:  [ . . 1 2 ]   1
06:  [ . 1 . . ]   1
07:  [ . 1 . 1 ]   0
08:  [ . 1 . 2 ]   0
09:  [ . 1 1 . ]   1
10:  [ . 1 1 1 ]   2
11:  [ . 1 1 2 ]   1
12:  [ . 1 2 . ]   0
13:  [ . 1 2 1 ]   0
14:  [ . 1 2 2 ]   1
15:  [ . 1 2 3 ]   0
There are 5 sequences without flat steps, 6 with one flat step, etc., giving row [5, 6, 3, 1, 0] for n=4.
		

Crossrefs

Row sums give A022493.
T(2n,n) gives A242164.
Main diagonal and lower diagonals give: A000007, A000012, A000027(n+1), A002378(n+1), A134481(n+1), A130810(n+4).
Cf. A137251 (the same for ascents), A238858 (the same for descents).

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, 1, expand(add(
          `if`(j=i, x, 1) *b(n-1, j, t+`if`(j>i, 1, 0)), j=0..t+1)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, -1$2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, Expand[Sum[If[j == i, x, 1]*b[n-1, j, t + If[j>i, 1, 0]], {j, 0, t+1}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n}]][ b[n, -1, -1]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 06 2015, after Alois P. Heinz *)

A179525 G.f.: A(x) = Sum_{n>=0} Product_{k=1..n} ((1+x)^k - 1).

Original entry on oeis.org

1, 1, 2, 7, 33, 197, 1419, 11966, 115575, 1257718, 15223822, 202860828, 2950665011, 46516215168, 790009447590, 14379745626739, 279256447482090, 5763290215111558, 125960271446527241, 2906289188751628643, 70594767279197608011, 1800695322331687800336, 48122711251655255426539, 1344617808976210991187090, 39206731897407002624384182, 1190905492485213830900901986
Offset: 0

Views

Author

Paul D. Hanna, Jul 17 2010

Keywords

Comments

From Vít Jelínek, Feb 12 2012: (Start)
a(n) has the following combinatorial interpretations:
(1) the number of upper-triangular matrices over {0,1} having at least one '1'-entry in each row and having n '1'-entries in total. E.g., for n=2, this corresponds to these two matrices (with zeros represented as dots):
1. .1
.1 .1
(2) the number of upper-triangular matrices over {0,1} that are symmetric with respect to the northeast diagonal, have at least one '1'-entry in each row and column, have no '1'-entry on the northeast diagonal, and have 2n '1'-entries in total. For n=2, those are the two matrices
11. 1...
..1 .1..
..1 ..1.
...1
(3) the number of upper-triangular matrices over {0,1} that are symmetric with respect to the northeast diagonal, have at least one '1'-entry in each row and column, have at least one '1'-entry on the northeast diagonal, and have n '1'-entries on or above the northeast diagonal. For n=2, this corresponds to
11 1..
.1 .1.
..1
(End)
This is an example of Peter Bala's identity (cf. A158690):
Sum_{n>=0} Product_{k=1..n} (q^k - 1) = Sum_{n>=0} q^(-n^2) * Product_{k = 1..n} (q^(2*k-1) - 1) at q = 1 + x. See cross-references for other examples.

Examples

			G.f.: A(x) = 1 + x + 2*x^2 + 7*x^3 + 33*x^4 + 197*x^5 + 1419*x^6 +...
A(x) = 1 + ((1+x)-1) + ((1+x)-1)*((1+x)^2-1) + ((1+x)-1)*((1+x)^2-1)*((1+x)^3-1) +...
Let q = 1+x, then g.f. also equals:
A(x) = 1 + (q-1)/q + (q-1)*(q^3-1)/q^4 + (q-1)*(q^3-1)*(q^5-1)/q^9 + (q-1)*(q^3-1)*(q^5-1)*(q^7-1)/q^16 + (q-1)*(q^3-1)*(q^5-1)*(q^7-1)*(q^9-1)/q^25 +...
		

Crossrefs

Cf. A207434 (log).

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ Sum[ Product[ (1 + x)^j - 1, {j, k}], {k, 0, n}], {x, 0, n}]; (* Michael Somos, Jun 27 2017 *)
  • PARI
    {a(n) = polcoeff(sum(i=0, n, prod(j=1, i, (1+x)^j-1, 1+x*O(x^n))), n)};
    for(n=0, 30, print1(a(n), ", "))
    
  • PARI
    /* G.f. as a continued fraction: */
    {a(n) = local(CF=1+x*O(x)); for(k=0, n, CF=1/((1+x)^(n-k+1)-((1+x)^(n-k+2)-1)*CF)); polcoeff(1/(1-x*CF), n, x)}
    for(n=0, 30, print1(a(n), ", "))
    
  • PARI
    {a(n) = local(A=1+x, q=(1+x +x*O(x^n))); A = sum(m=0, n, q^(-m^2)*prod(k=1, m, (q^(2*k-1)-1))); polcoeff(A, n)}
    for(n=0, 30, print1(a(n), ", "))
    
  • PARI
    /* Sum_{n>=0} n!*Product_{k=0..n-1} [Integral (1+x)^k dx] */
    {a(n) = my(A=1); A = sum(m=0,n, m! * prod(k=0,m-1, intformal((1+x)^k) +x*O(x^n)) );polcoeff(A,n)}
    for(n=0, 30, print1(a(n), ", ")) \\ Paul D. Hanna, Aug 16 2016

Formula

G.f.: 1/(1 - ((1+x)-1)/((1+x) - ((1+x)^2-1)/((1+x)^2 - ((1+x)^3-1)/((1+x)^3 - ((1+x)^4-1)/((1+x)^4 - ((1+x)^5-1)/((1+x)^5 -...)))))), (continued fraction) [Paul D. Hanna, Jan 29 2012]
G.f.: Sum_{n>=0} q^(-n^2) * Product_{k=1..n} (q^(2*k-1) - 1) where q = 1+x. [Based on Peter Bala's identity in comments]
Conjecturally, a(n) is asymptotically c*n!*(12/Pi^2)^n, where c=6*sqrt(2)*exp(-Pi^2/24)/Pi^2. - Vít Jelínek, Feb 12 2012 [This is correct: see Hwang and Jin, Table 3, p. 26. - Peter Bala, Jan 31 2021]
G.f.: Q(0), where Q(k)= 1 - (1-(1+x)^(2*k+1))/(1 - (1-(1+x)^(2*k+2))/(1 - (1+x)^(2*k+2) - 1/Q(k+1))); (continued fraction). Conjecture. - Sergei N. Gladkovskii, May 13 2013
From Peter Bala, May 16 2017: (Start)
G.f.: A(x) = 1/2*( 1 + Sum_{n >= 0} (1 + x)^(n+1)*Product_{k = 1..n} ((1 + x)^k - 1) ).
Conjectural g.f.: Sum_{n >= 0} 1/(1 + x)^(n+1)*Product_{k = 1..n} (1 - 1/(1 + x)^(2*k)).
Conjectural g.f.: Sum_{n >= 0} (1 + x)^(2*n+1)*Product_{k = 1..2*n} (1 - (1 + x)^k). Cf. A158690, which has e.g.f. A(exp(x) - 1). (End)

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

Original entry on oeis.org

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

Views

Author

Joerg Arndt and Alois P. Heinz, Mar 06 2014

Keywords

Comments

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

Examples

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

Crossrefs

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

Programs

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

A079144 Number of labeled interval orders on n elements: (2+2)-free posets.

Original entry on oeis.org

1, 1, 3, 19, 207, 3451, 81663, 2602699, 107477247, 5581680571, 356046745023, 27365431508779, 2494237642655487, 266005087863259291, 32815976815540917183, 4636895313201764853259, 743988605732990946684927
Offset: 0

Author

Detlef Pauly (dettodet(AT)yahoo.de), Dec 27 2002

Keywords

Comments

From Peter Bala, Dec 26 2021: (Start)
We make the following conjectures:
1) Taking the sequence modulo an integer k gives an eventually periodic sequence with period dividing phi(k). For example, the sequence taken modulo 8 begins [1, 1, 3, 3, 7, 3, 7, 3, 7, ...] and appears to have a pre-period of length 3 and a period of length 2 = (1/2)*phi(8).
2) Let i >= 0 and define a_i(n) = a(n+i). Then for each i the Gauss congruences a_i(n*p^k) == a_i(n*p^(k-1)) ( mod p^k ) hold for all prime p and positive integers n and k. If true, then for each i the expansion of exp( Sum_{n >= 1} a_i(n)*x^n/n ) has integer coefficients. (End)

Examples

			1 + x + 3*x^2 + 19*x^3 + 207*x^4 + 3451*x^5 + 81663*x^6 + 2602699*x^7 + ...
		

Crossrefs

Cf. A022493 (unlabeled interval orders).
Cf. A002439 (Glaisher's T numbers), A002114 (Glaisher's H numbers).

Programs

  • Maple
    A002439 := proc(n) option remember; if n = 0 then 1; else (-4)^n-add((-9)^k*binomial(2*n+1,2*k)*procname(n-k),k=1..n+1) ; end if;end proc:
    seq(1/(24^n)*add(binomial(n,k)*A002439(k), k = 0..n), n = 0..20); # Peter Bala, Dec 26 2021
  • Mathematica
    nmax=20; rk=Rest[CoefficientList[Series[Sum[Product[1-1/(1+x)^j,{j,1,n}],{n,0,nmax}],{x,0,nmax}],x]]; Flatten[{1,Table[Sum[rk[[k]] * k! * StirlingS2[n,k],{k,1,n}],{n,1,nmax}]}] (* Vaclav Kotesovec, May 03 2014 *)
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( subst( sum( i=0, n, prod( j=1, i, 1 - (1 - x + O(x^(n - i + 2)))^j )), x, 1 - exp( -x + x * O(x^n))), n))} /* Michael Somos, Apr 01 2012 */

Formula

a(n) = (1/(24^n))*Sum_{k=0..n} binomial(n, k)*A002439(k). Zagier 2001, p. 954.
G.f.: Sum(Product(1-exp(-k*x),k = 1 .. n),n = 0 .. infinity). a(n) = Sum_{k=0..n} k!*Stirling2(n,k)*A138265(k). - Vladeta Jovovic, Mar 11 2008
From Peter Bala, Mar 19 2009: (Start)
Conjectural form for the o.g.f. as a continued fraction:
1/(1-x/(1-2*x/(1-5*x/(1-7*x/(1-12*x/(1-15*x/(1- ...))))))) = 1 + x + 3*x^2 + 19*x^3 + 207*x^4 + ..., where the sequence [1,2,5,7,12,15,..] is the sequence of generalized pentagonal numbers A001318. Compare with the continued fraction form of the o.g.f. of A002105. (End)
E.g.f.: 1+(exp(x)-1)/(G(0)+1-exp(x)), where G(k)= 2*exp(x*(k+1))-1-exp(x*(k+1))*(exp(x*(k+2))-1)/G(k+1); (continued fraction, Euler's kind, 1-step). - Sergei N. Gladkovskii, Jan 06 2012
Asymptotics (Brightwell and Keller, 2011): a(n) ~ 12*sqrt(3)/Pi^(5/2) * (n!)^2 * sqrt(n) * (6/Pi^2)^n. - Vaclav Kotesovec, May 03 2014
From Peter Bala, May 11 2017: (Start)
For a proof of above conjectural continued fraction representation of the o.g.f. see the Bala link.
G.f.: 1/(1 + x - 2*x/(1 - 1*x/(1 + x - 7*x/(1 - 5*x/(1 + x - 15*x/(1 - 12*x/(1 + x - 26*x/(1 - 22*x/(1 + x - ...))))))))), where the sequence of unsigned partial numerators [2, 1, 7, 5, 15, 12, ...] is obtained from A001318 by swapping adjacent terms.
E.g.f.: F(q) = Sum_{n >= 0} q^(n+1)*Product_{i = 1..n} (1 - q^i)^2 at q = exp(t). Note that F(q) at q = 1/(1 - t) is a g.f. for unlabeled interval orders A022493, and at q = 1 - t gives a g.f. for A138265. (End)
From Peter Bala, Dec 26 2021: (Start)
a(6*n + 5) == 0 (mod 7); a(10*n + 7) == 0 (mod 11);
a(12*n + 11) == 0 (mod 13); a(16*n + 5) == a(16*n + 8) == 0 (mod 17);
a(18*n + 3) == 0 (mod 19); a(22*n + 4) == 0 (mod 23). (End)

A137251 Triangle T(n,k) read by rows: number of k X k triangular matrices with nonnegative integer entries and without zero rows or columns such that sum of all entries is equal to n, n>=1, 1<=k<=n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 7, 1, 1, 10, 26, 15, 1, 1, 15, 71, 98, 31, 1, 1, 21, 161, 425, 342, 63, 1, 1, 28, 322, 1433, 2285, 1138, 127, 1, 1, 36, 588, 4066, 11210, 11413, 3670, 255, 1, 1, 45, 1002, 10165, 44443, 79781, 54073, 11586, 511, 1, 1, 55, 1617, 23056, 150546, 434638, 528690, 246409, 36038, 1023, 1
Offset: 1

Author

Vladeta Jovovic, Mar 11 2008

Keywords

Comments

Row sums are A022493.
Number of ascent sequences of length n with k-1 ascents, see example. [Joerg Arndt, Nov 03 2012]
Number of interval orders on n elements having exactly k maximal antichains. Also, number of interval orders on n elements having an interval representation with k distinct endpoints, but not with k-1 distinct endpoints. Also, number of interval orders on n elements whose elements define k distinct strict down-sets (a strict down-set defined by an element x of a poset (P,<) is the set {y in P: yVít Jelínek, Sep 06 2014

Examples

			Triangle starts:
01:  1,
02:  1,  1,
03:  1,  3,    1,
04:  1,  6,    7,     1,
05:  1, 10,   26,    15,      1,
06:  1, 15,   71,    98,     31,       1,
07:  1, 21,  161,   425,    342,      63,       1,
08:  1, 28,  322,  1433,   2285,    1138,     127,       1,
09:  1, 36,  588,  4066,  11210,   11413,    3670,     255,       1,
10:  1, 45, 1002, 10165,  44443,   79781,   54073,   11586,     511,      1,
11:  1, 55, 1617, 23056, 150546,  434638,  528690,  246409,   36038,   1023,    1,
12:  1, 66, 2497, 48400, 451515, 1968580, 3895756, 3316193, 1090517, 110930, 2047, 1,
...
From _Joerg Arndt_, Nov 03 2012: (Start)
The 53 ascent sequences of length 5 together with their numbers of ascents are (dots for zeros):
01:  [ . . . . . ]   0      28:  [ . 1 1 . 1 ]   2
02:  [ . . . . 1 ]   1      29:  [ . 1 1 . 2 ]   2
03:  [ . . . 1 . ]   1      30:  [ . 1 1 1 . ]   1
04:  [ . . . 1 1 ]   1      31:  [ . 1 1 1 1 ]   1
05:  [ . . . 1 2 ]   2      32:  [ . 1 1 1 2 ]   2
06:  [ . . 1 . . ]   1      33:  [ . 1 1 2 . ]   2
07:  [ . . 1 . 1 ]   2      34:  [ . 1 1 2 1 ]   2
08:  [ . . 1 . 2 ]   2      35:  [ . 1 1 2 2 ]   2
09:  [ . . 1 1 . ]   1      36:  [ . 1 1 2 3 ]   3
10:  [ . . 1 1 1 ]   1      37:  [ . 1 2 . . ]   2
11:  [ . . 1 1 2 ]   2      38:  [ . 1 2 . 1 ]   3
12:  [ . . 1 2 . ]   2      39:  [ . 1 2 . 2 ]   3
13:  [ . . 1 2 1 ]   2      40:  [ . 1 2 . 3 ]   3
14:  [ . . 1 2 2 ]   2      41:  [ . 1 2 1 . ]   2
15:  [ . . 1 2 3 ]   3      42:  [ . 1 2 1 1 ]   2
16:  [ . 1 . . . ]   1      43:  [ . 1 2 1 2 ]   3
17:  [ . 1 . . 1 ]   2      44:  [ . 1 2 1 3 ]   3
18:  [ . 1 . . 2 ]   2      45:  [ . 1 2 2 . ]   2
19:  [ . 1 . 1 . ]   2      46:  [ . 1 2 2 1 ]   2
20:  [ . 1 . 1 1 ]   2      47:  [ . 1 2 2 2 ]   2
21:  [ . 1 . 1 2 ]   3      48:  [ . 1 2 2 3 ]   3
22:  [ . 1 . 1 3 ]   3      49:  [ . 1 2 3 . ]   3
23:  [ . 1 . 2 . ]   2      50:  [ . 1 2 3 1 ]   3
24:  [ . 1 . 2 1 ]   2      51:  [ . 1 2 3 2 ]   3
25:  [ . 1 . 2 2 ]   2      52:  [ . 1 2 3 3 ]   3
26:  [ . 1 . 2 3 ]   3      53:  [ . 1 2 3 4 ]   4
27:  [ . 1 1 . . ]   1
There is 1 ascent sequence with no ascent, 10 with one ascent, etc., giving the fourth row [1, 10, 26, 15, 1].
(End)
		

References

  • Peter C. Fishburn, Interval Orders and Interval Graphs: Study of Partially Ordered Sets, John Wiley & Sons, 1985.

Crossrefs

Cf. A022493 (number of ascent sequences), A218577 (ascent sequences with maximal element k), A175579 (ascent sequences with k zeros).
T(2n,n) gives A357141.

Programs

  • Maple
    b:= proc(n, i, t) option remember; local j; if n<1 then [0$t, 1]
          else []; for j from 0 to t+1 do zip((x, y)->x+y, %,
          b(n-1, j, t+`if`(j>i, 1, 0)), 0) od; % fi
        end:
    T:= n-> b(n-1, 0, 0)[]:
    seq(T(n), n=1..12);  # Alois P. Heinz, May 20 2013
  • Mathematica
    zip[f_, x_List, y_List, z_] := With[{m = Max[Length[x], Length[y]]}, f[PadRight[x, m, z], PadRight[y, m, z]]]; b[n_, i_, t_] := b[n, i, t] = Module[{j, pc}, If[n<1, Append[Array[0&, t], 1], pc = {}; For[j = 0, j <= t+1, j++, pc = zip[Plus, pc, b[n-1, j, t+If[j>i, 1, 0]], 0]]; pc]]; T[n_] := b[n-1, 0, 0]; Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Jan 29 2014, after Alois P. Heinz *)

Formula

G.f.: Sum_{n,k>=1} T(n,k)x^n y^k = Sum_{n>=1} y^n Product_{i=1..n} (1-(1-x)^i)/(y+(1-x)^i-y*(1-x)^i). See Jelínek's paper, Corollary 2.5. - Vít Jelínek, Sep 06 2014

A025262 a(n) = a(1)*a(n-1) + a(2)*a(n-2) + ... + a(n-1)*a(1) for n >= 4.

Original entry on oeis.org

1, 1, 1, 3, 8, 23, 68, 207, 644, 2040, 6558, 21343, 70186, 232864, 778550, 2620459, 8872074, 30195288, 103246502, 354508628, 1221846856, 4225644866, 14659644348, 51002664023, 177909901566, 622093882290, 2180123564130, 7656055966092
Offset: 1

Keywords

Comments

a(n) is the number of ascent sequences (A022493) of length n-1 such that the nonzero entries are weakly increasing and no two consecutive entries are both 0. For example a(4) = 3 counts 010, 011, 012 and a(5) = 8 counts 0101, 0102, 0110, 0111, 0112, 0120, 0122, 0123. - David Callan, Nov 25 2021
The o.g.f. y (= x + x^2 + x^3 + ...) of this sequence satisfies y^2 - y = x^3 - x. If y is replaced by -y, then it is the elliptic curve y^2 + y = x^3 - x with LMFDB label 37.a1 (Cremona label 37a1) associated to the Somos-4 sequence via elliptic divisibility sequence A006769. - Michael Somos, Apr 18 2023

Examples

			G.f. = x + x^2 + x^3 + 3*x^4 + 8*x^5 + 23*x^6 + 68*x^7 + 207*x^8 + 644*x^9 + ...
		

Crossrefs

Programs

  • Mathematica
    nmax = 30; aa = ConstantArray[0, nmax]; aa[[1]] = 1; aa[[2]] = 1; aa[[3]] = 1; Do[aa[[n]] = Sum[aa[[k]] * aa[[n - k]], {k, 1, n - 1}], {n, 4, nmax}]; aa (* Vaclav Kotesovec, Jan 25 2015 *)
    Nest[Append[#, #.Reverse[#]] &, {1, 1, 1}, 25] (* Jan Mangaldan, Jul 07 2020 *)
  • PARI
    {a(n) = polcoeff( (1 - sqrt(1 - 4*x + 4*x^3 + x * O(x^n))) / 2, n)}; /* Michael Somos, Aug 04 2000 */

Formula

G.f.: (1 - sqrt(1 - 4*x + 4*x^3)) / 2. Satisfies A(x) - A(x)^2 = x - x^3. - Michael Somos, Aug 04 2000
Given an integer t >= 1 and initial values u = [a_0, a_1, ..., a_{t-1}], we may define an infinite sequence Phi(u) by setting a_n = a_{n-1} + a_0*a_{n-1} + a_1*a_{n-2} + ... + a_{n-2}*a_1 for n >= t. For example Phi([1]) is the Catalan numbers A000108. The present sequence is Phi([1,1,1]). - Gary W. Adamson, Oct 27 2008
Row sums of A176703 if offset 0. - Michael Somos, Jan 09 2012
a(n+2) = A056010(n) if n >= 0.
a(n) = Sum_{m=0..floor((n-1)/2)} C(n-2*m-1)*binomial(n-2*m,m)*(-1)^m, where C = A000108 are the Catalan numbers. - Vladimir Kruchinin, Jan 26 2013
0 = a(n)*(+16*a(n+1) - 64*a(n+3) + 22*a(n+4)) + a(n+1)*(+32*a(n+2) - 14*a(n+3)) + a(n+2)*(+16*a(n+3) - 10*a(n+4)) + a(n+3)*(+2*a(n+3) + a(n+4)) if n>0. - Michael Somos, Jan 18 2015
Recurrence: n*a(n) = 2*(2*n-3)*a(n-1) - 2*(2*n-9)*a(n-3). - Vaclav Kotesovec, Jan 25 2015
a(n) ~ sqrt(3 - 8*r) * (4 - 4*r^2)^n / (4*sqrt(Pi)*n^(3/2)), where r = 2*sin(arccos(-3^(3/2)/8)/3 - Pi/6)/sqrt(3). - Vaclav Kotesovec, Jun 05 2022
Showing 1-10 of 43 results. Next