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-8 of 8 results.

A011782 Coefficients of expansion of (1-x)/(1-2*x) in powers of x.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592
Offset: 0

Views

Author

Lee D. Killough (killough(AT)wagner.convex.com)

Keywords

Comments

Apart from initial term, same as A000079 (powers of 2).
Number of compositions (ordered partitions) of n. - Toby Bartels, Aug 27 2003
Number of ways of putting n unlabeled items into (any number of) labeled boxes where every box contains at least one item. Also "unimodal permutations of n items", i.e., those which rise then fall. (E.g., for three items: ABC, ACB, BCA and CBA are unimodal.) - Henry Bottomley, Jan 17 2001
Number of permutations in S_n avoiding the patterns 213 and 312. - Tuwani Albert Tshifhumulo, Apr 20 2001. More generally (see Simion and Schmidt), the number of permutations in S_n avoiding (i) the 123 and 132 patterns; (ii) the 123 and 213 patterns; (iii) the 132 and 213 patterns; (iv) the 132 and 231 patterns; (v) the 132 and 312 patterns; (vi) the 213 and 231 patterns; (vii) the 213 and 312 patterns; (viii) the 231 and 312 patterns; (ix) the 231 and 321 patterns; (x) the 312 and 321 patterns.
a(n+2) is the number of distinct Boolean functions of n variables under action of symmetric group.
Number of unlabeled (1+2)-free posets. - Detlef Pauly, May 25 2003
Image of the central binomial coefficients A000984 under the Riordan array ((1-x), x*(1-x)). - Paul Barry, Mar 18 2005
Binomial transform of (1, 0, 1, 0, 1, 0, 1, 0, 1, 0, ...); inverse binomial transform of A007051. - Philippe Deléham, Jul 04 2005
Also, number of rationals in [0, 1) whose binary expansions terminate after n bits. - Brad Chalfan, May 29 2006
Equals row sums of triangle A144157. - Gary W. Adamson, Sep 12 2008
Prepend A089067 with a 1, getting (1, 1, 3, 5, 13, 23, 51, ...) as polcoeff A(x); then (1, 1, 2, 4, 8, 16, ...) = A(x)/A(x^2). - Gary W. Adamson, Feb 18 2010
An elephant sequence, see A175655. For the central square four A[5] vectors, with decimal values 2, 8, 32 and 128, lead to this sequence. For the corner squares these vectors lead to the companion sequence A094373. - Johannes W. Meijer, Aug 15 2010
From Paul Curtz, Jul 20 2011: (Start)
Array T(m,n) = 2*T(m,n-1) + T(m-1,n):
1, 1, 2, 4, 8, 16, ... = a(n)
1, 3, 8, 20, 48, 112, ... = A001792,
1, 5, 18, 56, 160, 432, ... = A001793,
1, 7, 32, 120, 400, 1232, ... = A001794,
1, 9, 50, 220, 840, 2912, ... = A006974, followed with A006975, A006976, gives nonzero coefficients of Chebyshev polynomials of first kind A039991 =
1,
1, 0,
2, 0, -1,
4, 0, -3, 0,
8, 0, -8, 0, 1.
T(m,n) third vertical: 2*n^2, n positive (A001105).
Fourth vertical appears in Janet table even rows, last vertical (A168342 array, A138509, rank 3, 13, = A166911)). (End)
A131577(n) and differences are:
0, 1, 2, 4, 8, 16,
1, 1, 2, 4, 8, 16, = a(n),
0, 1, 2, 4, 8, 16,
1, 1, 2, 4, 8, 16.
Number of 2-color necklaces of length 2n equal to their complemented reversal. For length 2n+1, the number is 0. - David W. Wilson, Jan 01 2012
Edges and also central terms of triangle A198069: a(0) = A198069(0,0) and for n > 0: a(n) = A198069(n,0) = A198069(n,2^n) = A198069(n,2^(n-1)). - Reinhard Zumkeller, May 26 2013
These could be called the composition numbers (see the second comment) since the equivalent sequence for partitions is A000041, the partition numbers. - Omar E. Pol, Aug 28 2013
Number of self conjugate integer partitions with exactly n parts for n>=1. - David Christopher, Aug 18 2014
The sequence is the INVERT transform of (1, 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...). - Gary W. Adamson, Jul 16 2015
Number of threshold graphs on n nodes [Hougardy]. - Falk Hüffner, Dec 03 2015
Number of ternary words of length n in which binary subwords appear in the form 10...0. - Milan Janjic, Jan 25 2017
a(n) is the number of words of length n over an alphabet of two letters, of which one letter appears an even number of times (the empty word of length 0 is included). See the analogous odd number case in A131577, and the Balakrishnan reference in A006516 (the 4-letter odd case), pp. 68-69, problems 2.66, 2.67 and 2.68. - Wolfdieter Lang, Jul 17 2017
Number of D-equivalence classes of Łukasiewicz paths. Łukasiewicz paths are D-equivalent iff the positions of pattern D are identical in these paths. - Sergey Kirgizov, Apr 08 2018
Number of color patterns (set partitions) for an oriented row of length n using two or fewer colors (subsets). Two color patterns are equivalent if we permute the colors. For a(4)=8, the 4 achiral patterns are AAAA, AABB, ABAB, and ABBA; the 4 chiral patterns are the 2 pairs AAAB-ABBB and AABA-ABAA. - Robert A. Russell, Oct 30 2018
The determinant of the symmetric n X n matrix M defined by M(i,j) = (-1)^max(i,j) for 1 <= i,j <= n is equal to a(n) * (-1)^(n*(n+1)/2). - Bernard Schott, Dec 29 2018
For n>=1, a(n) is the number of permutations of length n whose cyclic representations can be written in such a way that when the cycle parentheses are removed what remains is 1 through n in natural order. For example, a(4)=8 since there are exactly 8 permutations of this form, namely, (1 2 3 4), (1)(2 3 4), (1 2)(3 4), (1 2 3)(4), (1)(2)(3 4), (1)(2 3)(4), (1 2)(3)(4), and (1)(2)(3)(4). Our result follows readily by conditioning on k, the number of parentheses pairs of the form ")(" in the cyclic representation. Since there are C(n-1,k) ways to insert these in the cyclic representation and since k runs from 0 to n-1, we obtain a(n) = Sum_{k=0..n-1} C(n-1,k) = 2^(n-1). - Dennis P. Walsh, May 23 2020
Maximum number of preimages that a permutation of length n + 1 can have under the consecutive-231-avoiding stack-sorting map. - Colin Defant, Aug 28 2020
a(n) is the number of occurrences of the empty set {} in the von Neumann ordinals from 0 up to n. Each ordinal k is defined as the set of all smaller ordinals: 0 = {}, 1 = {0}, 2 = {0,1}, etc. Since {} is the foundational element of all ordinals, the total number of times it appears grows as powers of 2. - Kyle Wyonch, Mar 30 2025

Examples

			G.f. = 1 + x + 2*x^2 + 4*x^3 + 8*x^4 + 16*x^5 + 32*x^6 + 64*x^7 + 128*x^8 + ...
    ( -1   1  -1)
det (  1   1   1)  = 4
    ( -1  -1  -1)
		

References

  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education Journal, Vol. 31, No. 1, pp. 24-28, Winter 1997.
  • S. Kitaev, Patterns in Permutations and Words, Springer-Verlag, 2011. see p. 399 Table A.7
  • Xavier Merlin, Methodix Algèbre, Ellipses, 1995, p. 153.

Crossrefs

Sequences with g.f.'s of the form ((1-x)/(1-2*x))^k: this sequence (k=1), A045623 (k=2), A058396 (k=3), A062109 (k=4), A169792 (k=5), A169793 (k=6), A169794 (k=7), A169795 (k=8), A169796 (k=9), A169797 (k=10).
Cf. A005418 (unoriented), A122746(n-3) (chiral), A016116 (achiral).
Row sums of triangle A100257.
A row of A160232.
Row 2 of A278984.

Programs

  • Haskell
    a011782 n = a011782_list !! n
    a011782_list = 1 : scanl1 (+) a011782_list
    -- Reinhard Zumkeller, Jul 21 2013
    
  • Magma
    [Floor((1+2^n)/2): n in [0..35]]; // Vincenzo Librandi, Aug 21 2011
    
  • Maple
    A011782:= n-> ceil(2^(n-1)): seq(A011782(n), n=0..50); # Wesley Ivan Hurt, Feb 21 2015
    with(PolynomialTools):  A011782:=seq(coeftayl((1-x)/(1-2*x), x = 0, k),k=0..10^2); # Muniru A Asiru, Sep 26 2017
  • Mathematica
    f[s_] := Append[s, Ceiling[Plus @@ s]]; Nest[f, {1}, 32] (* Robert G. Wilson v, Jul 07 2006 *)
    CoefficientList[ Series[(1-x)/(1-2x), {x, 0, 32}], x] (* Robert G. Wilson v, Jul 07 2006 *)
    Table[Sum[StirlingS2[n, k], {k,0,2}], {n, 0, 30}] (* Robert A. Russell, Apr 25 2018 *)
    Join[{1},NestList[2#&,1,40]] (* Harvey P. Dale, Dec 06 2018 *)
  • PARI
    {a(n) = if( n<1, n==0, 2^(n-1))};
    
  • PARI
    Vec((1-x)/(1-2*x) + O(x^30)) \\ Altug Alkan, Oct 31 2015
    
  • Python
    def A011782(n): return 1 if n == 0 else 2**(n-1) # Chai Wah Wu, May 11 2022
  • Sage
    [sum(stirling_number2(n,j) for j in (0..2)) for n in (0..35)] # G. C. Greubel, Jun 02 2020
    

Formula

a(0) = 1, a(n) = 2^(n-1).
G.f.: (1 - x) / (1 - 2*x) = 1 / (1 - x / (1 - x)). - Michael Somos, Apr 18 2012
E.g.f.: cosh(z)*exp(z) = (exp(2*z) + 1)/2.
a(0) = 1 and for n>0, a(n) = sum of all previous terms.
a(n) = Sum_{k=0..n} binomial(n, 2*k). - Paul Barry, Feb 25 2003
a(n) = Sum_{k=0..n} binomial(n,k)*(1+(-1)^k)/2. - Paul Barry, May 27 2003
a(n) = floor((1+2^n)/2). - Toby Bartels (toby+sloane(AT)math.ucr.edu), Aug 27 2003
G.f.: Sum_{i>=0} x^i/(1-x)^i. - Jon Perry, Jul 10 2004
a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(k+1, n-k)*binomial(2*k, k). - Paul Barry, Mar 18 2005
a(n) = Sum_{k=0..floor(n/2)} A055830(n-k, k). - Philippe Deléham, Oct 22 2006
a(n) = Sum_{k=0..n} A098158(n,k). - Philippe Deléham, Dec 04 2006
G.f.: 1/(1 - (x + x^2 + x^3 + ...)). - Geoffrey Critzer, Aug 30 2008
a(n) = A000079(n) - A131577(n).
a(n) = A173921(A000079(n)). - Reinhard Zumkeller, Mar 04 2010
a(n) = Sum_{k=2^n..2^(n+1)-1} A093873(k)/A093875(k), sums of rows of the full tree of Kepler's harmonic fractions. - Reinhard Zumkeller, Oct 17 2010
E.g.f.: (exp(2*x)+1)/2 = (G(0) + 1)/2; G(k) = 1 + 2*x/(2*k+1 - x*(2*k+1)/(x + (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Dec 03 2011
A051049(n) = p(n+1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, Apr 18 2012
A008619(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, Apr 18 2012
INVERT transform is A122367. MOBIUS transform is A123707. EULER transform of A059966. PSUM transform is A000079. PSUMSIGN transform is A078008. BINOMIAL transform is A007051. REVERT transform is A105523. A002866(n) = a(n)*n!. - Michael Somos, Apr 18 2012
G.f.: U(0), where U(k) = 1 + x*(k+3) - x*(k+2)/U(k+1); (continued fraction, 1-step). - Sergei N. Gladkovskii, Oct 10 2012
a(n) = A000041(n) + A056823(n). - Omar E. Pol, Aug 31 2013
E.g.f.: E(0), where E(k) = 1 + x/( 2*k+1 - x/E(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Dec 25 2013
G.f.: 1 + x/(1 + x)*( 1 + 3*x/(1 + 3*x)*( 1 + 5*x/(1 + 5*x)*( 1 + 7*x/(1 + 7*x)*( 1 + ... )))). - Peter Bala, May 27 2017
a(n) = Sum_{k=0..2} stirling2(n, k).
G.f.: Sum_{j=0..k} A248925(k,j)*x^j / Product_{j=1..k} 1-j*x with k=2. - Robert A. Russell, Apr 25 2018
a(n) = A053120(n, n), n >= 0, (main diagonal of triangle of Chebyshev's T polynomials). - Wolfdieter Lang, Nov 26 2019

Extensions

Additional comments from Emeric Deutsch, May 14 2001
Typo corrected by Philippe Deléham, Oct 25 2008

A056272 Word structures of length n using a 5-ary alphabet.

Original entry on oeis.org

1, 1, 2, 5, 15, 52, 202, 855, 3845, 18002, 86472, 422005, 2079475, 10306752, 51263942, 255514355, 1275163905, 6368612302, 31821472612, 159042661905, 795019337135, 3974515030652, 19870830712482, 99348921288655
Offset: 0

Views

Author

Keywords

Comments

Permuting the alphabet will not change a word structure. Thus aabc and bbca have the same structure.
Density of regular language L over {1,2,3,4}^* (i.e., number of strings of length n in L) described by regular expression 11* + 11*2(1+2)* + 11*2(1+2)*3(1+2+3)* + 11*2(1+2)*3(1+2+3)*4(1+2+3+4)* + 11*2(1+2)*3(1+2+3)*4(1+2+3+4)*5(1+2+3+4+5)* - Nelma Moreira, Oct 10 2004
Number of set partitions of [n] into at most 5 parts. - Joerg Arndt, Apr 18 2014

Examples

			For a(4)=15, the 7 achiral patterns are AAAA, AABB, ABAB, ABBA, ABBC, ABCA, and ABCD; the 8 chiral patterns are the 4 pairs AAAB-ABBB, AABA-ABAA, AABC-ABCC, and ABAC-ABCB.
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

A row of the array in A278984.
Cf. A056324 (unoriented), A320935 (chiral), A305751 (achiral).

Programs

  • GAP
    List([0..25],n->Sum([0..5],k->Stirling2(n,k))); # Muniru A Asiru, Oct 30 2018
  • Magma
    I:=[1,1,2,5,15]; [n le 5 select I[n] else 11*Self(n-1)-41*Self(n-2)+61*Self(n-3)-30*Self(n-4): n in [1..30]]; // Vincenzo Librandi, Apr 19 2014
    
  • Maple
    seq(add(combinat:-stirling2(n, j), j=0..5), n=0..23); # Zerinvary Lajos, Dec 04 2007
    # Alternative:
    (x*(x*(x*(11*x-37)+32)-10)+1)/(x*(x*(x*(30*x-61)+41)-11)+1):
    series(%, x, 32): seq(coeff(%, x, n), n=0..23); # Peter Luschny, Nov 05 2018
  • Mathematica
    CoefficientList[Series[(1 - 10 x + 32 x^2 - 37 x^3 + 11 x^4)/((x - 1) (3 x - 1) (2 x - 1) (5 x - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 19 2014 *)
    LinearRecurrence[{11,-41,61,-30},{1,1,2,5,15},30] (* Harvey P. Dale, Feb 25 2018 *)
    Table[Sum[StirlingS2[n, k], {k, 0, 5}], {n, 0, 30}] (* Robert A. Russell, Apr 25 2018 *)
    CoefficientList[Series[1/120 (44 + 45 E^x + 20 E^(2 x) + 10 E^(3 x) + E^(5 x)), {x, 0, 30}], x]*Table[k!, {k, 0, 30}] (* Stefano Spezia, Nov 06 2018 *)
  • PARI
    a(n) = sum(k=0,5, stirling(n, k, 2) ); \\ Joerg Arndt, Apr 18 2014
    

Formula

a(n) = Sum_{k=0..5} Stirling2(n, k).
a(n) = (5^n + 10*3^n + 20*2^n + 45)/5! for n >= 1. - Vladeta Jovovic, Aug 17 2003
From Nelma Moreira, Oct 10 2004: (Start)
For c=5, a(n) = c^n/c! + Sum_{k=0..c-2} (k^n/k!*(Sum_{j=2..c-k} (-1)^j/j!)).
a(n) = Sum_{k=1..c} g(k, c)*k^n where g(1, 1) = 1, g(1, c) = g(1, c-1) + (-1)^(c-1)/(c-1)! if c > 1; g(k, c) = g(k-1, c-1)/k if c > 1, 2 <= k <= c and n >= 1. (End)
a(n+1) is the top entry of the vector M^n*[1,1,1,1,1,0,0,0,...], where M is an infinite bidiagonal matrix with M(r,r+1)=1 in the superdiagonal and M(r,r)=r, r>=1 as the main diagonal, and the rest zeros. The n-th power of the matrix is multiplied from the right with a column vector starting with 5 1's. - Gary W. Adamson, Jun 24 2011
G.f.: (1 - 10x + 32x^2 - 37x^3 + 11x^4)/((1 - x)*(1 - 2x)*(1 - 3x)*(1 - 5x)). - R. J. Mathar, Jul 06 2011 [Adapted to offset 0 by Robert A. Russell, Oct 30 2018]
G.f.: Sum_{j=0..k} A248925(k,j)*x^j / Product_{j=1..k} 1-j*x with k=5. - Robert A. Russell, Apr 25 2018
E.g.f.: (1/120)*(44 + 45*exp(x) + 20*exp(2*x) + 10*exp(3*x) + exp(5*x)). - Stefano Spezia, Nov 06 2018

Extensions

a(0)=1 prepended by Robert A. Russell, Nov 06 2018

A124302 Number of set partitions with at most 3 blocks; number of Dyck paths of height at most 4; dimension of space of symmetric polynomials in 3 noncommuting variables.

Original entry on oeis.org

1, 1, 2, 5, 14, 41, 122, 365, 1094, 3281, 9842, 29525, 88574, 265721, 797162, 2391485, 7174454, 21523361, 64570082, 193710245, 581130734, 1743392201, 5230176602, 15690529805, 47071589414, 141214768241, 423644304722, 1270932914165, 3812798742494, 11438396227481
Offset: 0

Views

Author

Mike Zabrocki, Oct 25 2006

Keywords

Comments

Row sums of triangle in A056241. - Philippe Deléham, Oct 30 2006
Row sums of triangle in A147746. - Philippe Deléham, Dec 04 2008
Hankel transform is := [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...]. - Philippe Deléham, Dec 04 2008
Number of nonisomorphic graded posets with 0 and 1 and uniform Hasse graph of rank n with no 3-element antichain. (Uniform used in the sense of Retakh, Serconek and Wilson. Graded used in Stanley's sense that every maximal chain has the same length n.) - David Nacin, Feb 26 2012
Number of Dyck paths of length 2n and height at most 4. - Ira M. Gessel, Aug 06 2012

Examples

			There are 15 set partitions of {1,2,3,4}, only {{1},{2},{3},{4}} has more than 3 blocks, so a(4) = 14.
G.f. = 1 + x + 2*x^2 + 5*x^3 + 14*x^4 + 41*x^5 + 122*x^6 + 365*x^7 + ...
		

References

  • R. Stanley, Enumerative combinatorics, Vol. 1, Cambridge University Press, Cambridge, 1997, pp. 96-100.

Crossrefs

Essentially the same as A007051.

Programs

  • Magma
    I:=[1, 1, 2]; [n le 3 select I[n] else  4*Self(n-1) - 3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Dec 25 2012
    
  • Maple
    a:= proc(n); if n<3 then [1,1,2][n+1]; else 4*a(n-1)-3*a(n-2); fi; end:
    # Mike Zabrocki, Oct 25 2006
    with(GraphTheory): G:=PathGraph(5): A:= AdjacencyMatrix(G): nmax:=27; for n from 0 to 2*nmax do B(n):=A^n; b(n):=B(n)[1,1]; od: for n from 0 to nmax do a(n):=b(2*n) od: seq(a(n),n=0..nmax);
    # Johannes W. Meijer, May 29 2010
  • Mathematica
    a=Exp[x]-1; Range[0, 20]! CoefficientList[Series[1+a+a^2/2+a^3/6, {x,0,20}],x]
    Join[{1}, LinearRecurrence[{4, -3}, {1, 2}, 20]] (* David Nacin, Feb 26 2012 *)
    CoefficientList[Series[1 / (1 - x / (1 - x / (1 - x / (1 - x)))), {x, 0, 30}], x] (* Vincenzo Librandi, Dec 25 2012 *)
    Table[Sum[StirlingS2[n,k],{k,0,3}],{n,0,30}] (* Robert A. Russell, Mar 29 2018 *)
  • PARI
    {a(n) = if( n<1, n==0, (3^(n-1) + 1) / 2)}; /* Michael Somos, Apr 03 2014 */
  • Python
    def a(n, adict={0:1, 1:1, 2:2}):
        if n in adict:
            return adict[n]
        adict[n]=4*a(n-1) - 3*a(n-2)
        return adict[n] # David Nacin, Mar 04 2012
    

Formula

O.g.f.: (q^2 - 3*q + 1)/(3*q^2 - 4*q + 1) = Sum_{k=0..3} (q^k/Product_{i=1..k} (1-i*q)).
a(n) = 4*a(n-1) - 3*a(n-2); a(0) = 1, a(1) = 1, a(2) = 2, a(n) = Sum_{k=1..3} A008277(n,k).
Inverse binomial transform of A007581. - Philippe Deléham, Oct 30 2006
a(n) = Sum_{k=0..n} A056241(n,k), n >= 1. - Philippe Deléham, Oct 30 2006
a(0) = 1, a(n) = (3^(n-1) + 1)/2 for n >= 1, see A007051. - Philippe Deléham, Oct 30 2006
E.g.f.: (2 + 3*exp(x) + exp(3x))/6.
G.f.: 1 / (1 - x / (1 - x / (1 - x / (1 - x)))). - Michael Somos, May 03 2012
G.f.: 1 + x + 3*x^2*U(0)/2 where U(k) = 1 + 2/(3*3^k + 3*3^k/(1 - 18*x*3^k/ (9*x*3^k - 1/U(k+1)))); (continued fraction, 4-step). - Sergei N. Gladkovskii, Nov 01 2012
G.f.: 1+x*G(0) where G(k) = 1 + 2*x/( 1-2*x - x*(1-2*x)/(x + (1-2*x)*2/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 10 2012
a(n) = Sum_{k=0..3} Stirling2(n,k). - Robert A. Russell, Mar 29 2018
G.f.: Sum_{j=0..k} A248925(k,j)*x^j / Product_{j=1..k} 1-j*x with k=3. - Robert A. Russell, Apr 25 2018

A056273 Word structures of length n using a 6-ary alphabet.

Original entry on oeis.org

1, 1, 2, 5, 15, 52, 203, 876, 4111, 20648, 109299, 601492, 3403127, 19628064, 114700315, 676207628, 4010090463, 23874362200, 142508723651, 852124263684, 5101098232519, 30560194493456, 183176170057707, 1098318779272060, 6586964947803695, 39510014478620232, 237013033135668883
Offset: 0

Views

Author

Keywords

Comments

Set partitions of the n-set into at most 6 parts; also restricted growth strings (RGS) with six letters s(1),s(2),...,s(6) where the first occurrence of s(j) precedes the first occurrence of s(k) for all j < k. - Joerg Arndt, Jul 06 2011
Permuting the alphabet will not change a word structure. Thus aabc and bbca have the same structure.
Density of regular language L over {1,2,3,4,5,6}^* (i.e., number of strings of length n in L) described by regular expression with c=6: Sum_{i=1..c} Product_{j=1..i} (j(1+...+j)*) where Sum stands for union and Product for concatenation. - Nelma Moreira, Oct 10 2004
Word structures of length n using an N-ary alphabet are generated by taking M^n* the vector [(N 1's),0,0,0,...], leftmost column term = a(n+1). In the case of A056273, the vector = [1,1,1,1,1,1,0,0,0,...]. As the vector approaches all 1's, the leftmost column terms approach A000110, the Bell sequence. - Gary W. Adamson, Jun 23 2011
From Gary W. Adamson, Jul 06 2011: (Start)
Construct an infinite array of sequences representing word structures of length n using an N-ary alphabet as follows:
.
1, 1, 1, 1, 1, 1, 1, 1, ...; N=1, A000012
1, 2, 4, 8, 16, 32, 64, 128, ...; N=2, A000079
1, 2, 5, 14, 41, 122, 365, 1094, ...; N=3, A007051
1, 2, 5, 15, 51, 187, 715, 2795, ...; N=4, A007581
1, 2, 5, 15, 52, 202, 855, 3845, ...; N=5, A056272
1, 2, 5, 15, 52, 203, 876, 4111, ...; N=6, A056273
...
The sequences tend to A000110. Finite differences of columns reinterpreted as rows generate A008277 as a triangle: (1; 1,1; 1,3,1; 1,7,6,1; ...). (End)

Examples

			For a(4) = 15, the 7 achiral patterns are AAAA, AABB, ABAB, ABBA, ABBC, ABCA, and ABCD; the 8 chiral patterns are the 4 pairs AAAB-ABBB, AABA-ABAA, AABC-ABCC, and ABAC-ABCB.
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

A row of the array in A278984 and A320955.
Cf. A056325 (unoriented), A320936 (chiral), A305752 (chiral).

Programs

  • GAP
    List([0..25],n->Sum([0..6],k->Stirling2(n,k))); # Muniru A Asiru, Oct 30 2018
    
  • Magma
    [(&+[StirlingSecond(n, i): i in [0..6]]): n in [0..30]]; // Vincenzo Librandi, Nov 07 2018
  • Maple
    egf := (265+264*exp(x)+135*exp(x*2)+40*exp(x*3)+15*exp(x*4)+exp(6*x))/6!:
    ser := series(egf,x,30): seq(n!*coeff(ser,x,n),n=0..22); # Peter Luschny, Nov 06 2018
  • Mathematica
    Table[Sum[StirlingS2[n,k],{k,0,6}],{n,0,30}] (* or *) LinearRecurrence[ {16,-95,260,-324,144},{1,1,2,5,15,52},30] (* Harvey P. Dale, Jun 05 2015 *)
  • PARI
    Vec((1 - 15*x + 81*x^2 - 192*x^3 + 189*x^4 - 53*x^5)/((1-x)*(1-2*x)*(1-3*x)*(1-4*x)*(1-6*x)) + O(x^30)) \\ Michel Marcus, Nov 07 2018
    

Formula

a(n) = Sum_{k=0..6} Stirling2(n, k).
For n > 0, a(n) = (1/6!)*(6^n + 15*4^n + 40*3^n + 135*2^n + 264). - Vladeta Jovovic, Aug 17 2003
From Nelma Moreira, Oct 10 2004: (Start)
For n > 0 and c = 6:
a(n) = (c^n)/c! + Sum_{k=0..c-2} ((k^n)/k!*(Sum_{j=2..c-k}(((-1)^j)/j!))).
a(n) = Sum_{k=1..c} (g(k, c)*k^n) where g(1, 1) = 1; g(1, c) = g(1, c-1) + ((-1)^(c-1))/(c-1)! if c>1. For 2 <= k <= c: g(k, c) = g(k-1, c-1)/k if c>1. (End)
G.f.: (1 - 15*x + 81*x^2 - 192*x^3 + 189*x^4 - 53*x^5)/((1-x)*(1-2x)*(1-3x)*(1-4x)*(1-6x)). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 26 2009 [corrected by R. J. Mathar, Sep 16 2009] [Adapted to offset 0 by Robert A. Russell, Nov 06 2018]
G.f.: Sum_{j=0..k} A248925(k,j)*x^j / Product_{j=1..k} 1-j*x with k=6. - Robert A. Russell, Apr 25 2018
E.g.f.: (265 + 264*exp(x) + 135*exp(x*2) + 40*exp(x*3) + 15*exp(x*4) + exp(6*x))/6!. - Peter Luschny, Nov 06 2018

Extensions

a(0)=1 prepended by Robert A. Russell, Nov 06 2018

A124303 Number of set partitions of length <= 4; sum of first 4 columns of triangle of Stirling numbers of 2nd kind; dimension of space of symmetric polynomials in 4 noncommuting variables.

Original entry on oeis.org

1, 1, 2, 5, 15, 51, 187, 715, 2795, 11051, 43947, 175275, 700075, 2798251, 11188907, 44747435, 178973355, 715860651, 2863377067, 11453377195, 45813246635, 183252462251, 733008800427, 2932033104555, 11728128223915, 46912504507051, 187650001250987
Offset: 0

Views

Author

Mike Zabrocki, Oct 25 2006

Keywords

Comments

Apart from initial term, same as A007581. - Valery A. Liskovets, Nov 16 2006

Examples

			Number of set partitions of {1,2,3,4,5,6} are given by A008277(6,k) = 1, 31, 90, 65, 15, 1 and hence a(6) = 1+31+90+65 = 187.
		

Crossrefs

A row of the array in A278984.

Programs

  • Maple
    a:=proc(n); if n<4 then [1,1,2,5][n+1]; else 7*a(n-1)-14*a(n-2)+8*a(n-3); fi; end:
  • Mathematica
    Join[{1}, LinearRecurrence[{7, -14, 8}, {1, 2, 5}, 26]] (* Jean-François Alcover, Nov 20 2017 *)
    Table[Sum[StirlingS2[n,k],{k,0,4}],{n,0,40}] (* Robert A. Russell, Mar 29 2018 *)
  • PARI
    Vec((1 - 6*x + 9*x^2 - 3*x^3) / ((1 - x)*(1 - 2*x)*(1 - 4*x)) + O(x^30)) \\ Colin Barker, Nov 03 2017

Formula

O.g.f.: (3*q^3 - 9*q^2 + 6*q - 1)/(8*q^3 - 14*q^2 + 7*q - 1) = Sum_{k=0..4} (q^k/Product_{i=1..k} (1-i*q)).
a(n) = 7*a(n-1) - 14*a(n-2) + 8*a(n-3); a(0) = 1, a(1) = 1, a(2) = 2, a(3) = 5, a(n) = Sum_{k=1..4} A008277(n,k).
a(n) = (8 + 3*2^(1+n) + 4^n) / 24 for n>0. - Colin Barker, Nov 03 2017
a(n) = Sum_{k=0..4} Stirling2(n,k). - Robert A. Russell, Mar 29 2018
G.f.: Sum_{j=0..k} A248925(k,j)*x^j / Product_{j=1..k} 1-j*x with k=4. - Robert A. Russell, Apr 25 2018
E.g.f.: (9 + 8*exp(x) + 6*exp(2*x) + exp(4*x))/24. - Peter Luschny, Nov 06 2018

A099262 a(n) = (1/5040)*7^n + (1/240)*5^n + (1/72)*4^n + (1/16)*3^n + (11/60)*2^n + 53/144. Partial sum of Stirling numbers of second kind S(n,i), i=1..7 (i.e., a(n) = Sum_{i=1..7} S(n,i)).

Original entry on oeis.org

1, 2, 5, 15, 52, 203, 877, 4139, 21110, 115179, 665479, 4030523, 25343488, 164029595, 1084948961, 7291973067, 49582466986, 339971207051, 2345048898523, 16244652278171, 112871151708404, 785938550025147, 5480960778389365, 38264428799608235, 267342497477336542, 1868866831126685483
Offset: 1

Views

Author

Nelma Moreira, Oct 10 2004

Keywords

Comments

Density of regular language L over {1,2,3,4,5,6,7} (i.e., number of strings of length n in L) described by regular expression with c=7: Sum_{i=1..c} Product_{j=1..i} (j(1+...+j)*) where Sum stands for union and Product for concatenation.

Crossrefs

A row of the array in A278984.

Programs

  • Mathematica
    Table[Sum[StirlingS2[n, k], {k, 0, 7}], {n, 1, 30}] (* Robert A. Russell, Apr 25 2018 *)
  • PARI
    a(n) = (1/5040)*7^n + (1/240)*5^n + (1/72)*4^n + (1/16)*3^n + (11/60)*2^n + 53/144; \\ Altug Alkan, Apr 25 2018

Formula

For c=7, a(n) = (c^n)/c! + Sum_{k=1..c-2} ((k^n)/k!*(Sum_{j=2..c-k}(((-1)^j)/j!))) or = Sum_{k=1..c} (g(k, c)*k^n) where g(1, 1)=1, g(1, c) = g(1, c-1)+((-1)^(c-1))/(c-1)!, c > 1, g(k, c) = g(k-1, c-1)/k, for c > 1 and 2 <= k <= c.
G.f.: -x*(531*x^5-881*x^4+535*x^3-151*x^2+20*x-1) / ((x-1)*(2*x-1)*(3*x-1)*(4*x-1)*(5*x-1)*(7*x-1)). - Colin Barker, Dec 05 2012
a(n) = Sum_{k=0..7} Stirling2(n,k).
G.f.: Sum_{j=0..k} A248925(k,j)*x^j / Product_{j=1..k} 1-j*x with k=7. - Robert A. Russell, Apr 25 2018

Extensions

More terms from Michel Marcus, Jan 05 2025

A099263 a(n) = (1/40320)*8^n + (1/1440)*6^n + (1/360)*5^n + (1/64)*4^n + (11/180)*3^n + (53/288)*2^n + 103/280. Partial sum of Stirling numbers of second kind S(n,i), i=1..8 (i.e., a(n) = Sum_{i=1..8} S(n,i)).

Original entry on oeis.org

1, 2, 5, 15, 52, 203, 877, 4140, 21146, 115929, 677359, 4189550, 27243100, 184941915, 1301576801, 9433737120, 69998462014, 529007272061, 4054799902003, 31415584940850, 245382167055488, 1928337630016767, 15222915798289765, 120582710957928740, 957566218595705122, 7618489083072350433
Offset: 1

Views

Author

Nelma Moreira, Oct 10 2004

Keywords

Comments

Density of regular language L over {1,2,3,4,5,6,7,8} (i.e., number of strings of length n in L) described by a regular expression with c = 8: Sum_{i=1..c} Product_{j=1..i} (j(1+...+j)*), where "Sum" stands for union and "Product" for concatenation.

Crossrefs

A row of the array in A278984.
Cf. A008277 (Stirling2), A248925.

Programs

  • Magma
    [(1/40320)*8^n+(1/1440)*6^n+(1/360)*5^n+(1/64)*4^n +(11/180)*3^n+(53/288)*2^n+103/280: n in [1..30]]; // Vincenzo Librandi, Jul 27 2017
    
  • Mathematica
    CoefficientList[Series[-(3641 x^6 - 6583 x^5 + 4566 x^4 - 1579 x^3 + 290 x^2 - 27 x + 1) / ((x - 1) (2 x - 1) (3 x - 1) (4 x - 1) (5 x - 1) (6 x - 1) (8 x - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Jul 27 2017 *)
    Table[Sum[StirlingS2[n, k], {k, 0, 8}], {n, 1, 30}] (* Robert A. Russell, Apr 25 2018 *)
    LinearRecurrence[{29,-343,2135,-7504,14756,-14832,5760},{1,2,5,15,52,203,877},30] (* Harvey P. Dale, Aug 27 2019 *)
  • PARI
    a(n) = (1/40320)*8^n + (1/1440)*6^n + (1/360)*5^n + (1/64)*4^n + (11/180)*3^n + (53/288)*2^n + 103/280; \\ Altug Alkan, Apr 25 2018

Formula

For c = 8, a(n) = c^n/c! + Sum_{k=1..c-2} k^n/k! * Sum_{j=2..c-k} (-1)^j/j!, or = Sum_{k=1..c} g(k, c)*k^n, where g(1, 1) = 1, g(1, c) = g(1, c-1) + (-1)^(c-1)/(c-1)! for c > 1, and g(k, c) = g(k-1, c-1)/k for c > 1 and 2 <= k <= c.
G.f.: -x*(3641*x^6 - 6583*x^5 + 4566*x^4 - 1579*x^3 + 290*x^2 - 27*x + 1) / ((x-1)*(2*x-1)*(3*x-1)*(4*x-1)*(5*x-1)*(6*x-1)*(8*x-1)). [Colin Barker, Dec 05 2012]
a(n) = Sum_{k=0..8} Stirling2(n,k).
G.f.: Sum_{j=0..k} A248925(k,j)*x^j / Product_{j=1..k} (1 - j*x) with k = 8. - Robert A. Russell, Apr 25 2018

Extensions

More terms from Michel Marcus, Jan 05 2025

A164863 Number of ways of placing n labeled balls into 9 indistinguishable boxes; word structures of length n using a 9-ary alphabet.

Original entry on oeis.org

1, 1, 2, 5, 15, 52, 203, 877, 4140, 21147, 115974, 678514, 4211825, 27602602, 190077045, 1368705291, 10254521370, 79527284317, 635182667816, 5199414528808, 43426867585575, 368654643520692, 3170300933550687, 27542984610086665, 241205285284001240
Offset: 0

Views

Author

Alois P. Heinz, Aug 28 2009

Keywords

Crossrefs

Programs

  • Maple
    # first program:
    a:= n-> ceil(103/560*2^n +53/864*3^n +11/720*4^n +5^n/320 +6^n/2160 +7^n/10080 +9^n/362880): seq(a(n), n=0..25);
    # second program:
    a:= n-> add(Stirling2(n, k), k=0..9): seq(a(n), n=0..25);
  • Mathematica
    Table[Sum[StirlingS2[n, k], {k, 0, 9}], {n, 0, 30}] (* Robert A. Russell, Apr 25 2018 *)

Formula

a(n) = Sum_{k=0..9} stirling2 (n,k).
a(n) = ceiling (103/560*2^n +53/864*3^n +11/720*4^n +5^n/320 +6^n/2160 +7^n/10080 +9^n/362880).
G.f.: (16687*x^8 -67113*x^7 +88620*x^6 -56993*x^5 +20529*x^4 -4353*x^3 +539*x^2 -36*x+1) / ((9*x-1) *(7*x-1) *(6*x-1) *(5*x-1) *(4*x-1) *(3*x-1) *(2*x-1) *(x-1)).
G.f.: Sum_{j=0..k} A248925(k,j)*x^j / Product_{j=1..k} 1-j*x with k=9. - Robert A. Russell, Apr 25 2018
Showing 1-8 of 8 results.