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

A000027 The positive integers. Also called the natural numbers, the whole numbers or the counting numbers, but these terms are ambiguous.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77
Offset: 1

Views

Author

Keywords

Comments

For some authors, the terms "natural numbers" and "counting numbers" include 0, i.e., refer to the nonnegative integers A001477; the term "whole numbers" frequently also designates the whole set of (signed) integers A001057.
a(n) is smallest positive integer which is consistent with sequence being monotonically increasing and satisfying a(a(n)) = n (cf. A007378).
Inverse Euler transform of A000219.
The rectangular array having A000027 as antidiagonals is the dispersion of the complement of the triangular numbers, A000217 (which triangularly form column 1 of this array). The array is also the transpose of A038722. - Clark Kimberling, Apr 05 2003
For nonzero x, define f(n) = floor(nx) - floor(n/x). Then f=A000027 if and only if x=tau or x=-tau. - Clark Kimberling, Jan 09 2005
Numbers of form (2^i)*k for odd k (i.e., n = A006519(n)*A000265(n)); thus n corresponds uniquely to an ordered pair (i,k) where i=A007814, k=A000265 (with A007814(2n)=A001511(n), A007814(2n+1)=0). - Lekraj Beedassy, Apr 22 2006
If the offset were changed to 0, we would have the following pattern: a(n)=binomial(n,0) + binomial(n,1) for the present sequence (number of regions in 1-space defined by n points), A000124 (number of regions in 2-space defined by n straight lines), A000125 (number of regions in 3-space defined by n planes), A000127 (number of regions in 4-space defined by n hyperplanes), A006261, A008859, A008860, A008861, A008862 and A008863, where the last six sequences are interpreted analogously and in each "... by n ..." clause an offset of 0 has been assumed, resulting in a(0)=1 for all of them, which corresponds to the case of not cutting with a hyperplane at all and therefore having one region. - Peter C. Heinig (algorithms(AT)gmx.de), Oct 19 2006
Define a number of points on a straight line to be in general arrangement when no two points coincide. Then these are the numbers of regions defined by n points in general arrangement on a straight line, when an offset of 0 is assumed. For instance, a(0)=1, since using no point at all leaves one region. The sequence satisfies the recursion a(n) = a(n-1) + 1. This has the following geometrical interpretation: Suppose there are already n-1 points in general arrangement, thus defining the maximal number of regions on a straight line obtainable by n-1 points, and now one more point is added in general arrangement. Then it will coincide with no other point and act as a dividing wall thereby creating one new region in addition to the a(n-1)=(n-1)+1=n regions already there, hence a(n)=a(n-1)+1. Cf. the comments on A000124 for an analogous interpretation. - Peter C. Heinig (algorithms(AT)gmx.de), Oct 19 2006
The sequence a(n)=n (for n=1,2,3) and a(n)=n+1 (for n=4,5,...) gives to the rank (minimal cardinality of a generating set) for the semigroup I_n\S_n, where I_n and S_n denote the symmetric inverse semigroup and symmetric group on [n]. - James East, May 03 2007
The sequence a(n)=n (for n=1,2), a(n)=n+1 (for n=3) and a(n)=n+2 (for n=4,5,...) gives the rank (minimal cardinality of a generating set) for the semigroup PT_n\T_n, where PT_n and T_n denote the partial transformation semigroup and transformation semigroup on [n]. - James East, May 03 2007
"God made the integers; all else is the work of man." This famous quotation is a translation of "Die ganzen Zahlen hat der liebe Gott gemacht, alles andere ist Menschenwerk," spoken by Leopold Kronecker in a lecture at the Berliner Naturforscher-Versammlung in 1886. Possibly the first publication of the statement is in Heinrich Weber's "Leopold Kronecker," Jahresberichte D.M.V. 2 (1893) 5-31. - Clark Kimberling, Jul 07 2007
Binomial transform of A019590, inverse binomial transform of A001792. - Philippe Deléham, Oct 24 2007
Writing A000027 as N, perhaps the simplest one-to-one correspondence between N X N and N is this: f(m,n) = ((m+n)^2 - m - 3n + 2)/2. Its inverse is given by I(k)=(g,h), where g = k - J(J-1)/2, h = J + 1 - g, J = floor((1 + sqrt(8k - 7))/2). Thus I(1)=(1,1), I(2)=(1,2), I(3)=(2,1) and so on; the mapping I fills the first-quadrant lattice by successive antidiagonals. - Clark Kimberling, Sep 11 2008
a(n) is also the mean of the first n odd integers. - Ian Kent, Dec 23 2008
Equals INVERTi transform of A001906, the even-indexed Fibonacci numbers starting (1, 3, 8, 21, 55, ...). - Gary W. Adamson, Jun 05 2009
These are also the 2-rough numbers: positive integers that have no prime factors less than 2. - Michael B. Porter, Oct 08 2009
Totally multiplicative sequence with a(p) = p for prime p. Totally multiplicative sequence with a(p) = a(p-1) + 1 for prime p. - Jaroslav Krizek, Oct 18 2009
Triangle T(k,j) of natural numbers, read by rows, with T(k,j) = binomial(k,2) + j = (k^2-k)/2 + j where 1 <= j <= k. In other words, a(n) = n = binomial(k,2) + j where k is the largest integer such that binomial(k,2) < n and j = n - binomial(k,2). For example, T(4,1)=7, T(4,2)=8, T(4,3)=9, and T(4,4)=10. Note that T(n,n)=A000217(n), the n-th triangular number. - Dennis P. Walsh, Nov 19 2009
Hofstadter-Conway-like sequence (see A004001): a(n) = a(a(n-1)) + a(n-a(n-1)) with a(1) = 1, a(2) = 2. - Jaroslav Krizek, Dec 11 2009
a(n) is also the dimension of the irreducible representations of the Lie algebra sl(2). - Leonid Bedratyuk, Jan 04 2010
Floyd's triangle read by rows. - Paul Muljadi, Jan 25 2010
Number of numbers between k and 2k where k is an integer. - Giovanni Teofilatto, Mar 26 2010
Generated from a(2n) = r*a(n), a(2n+1) = a(n) + a(n+1), r = 2; in an infinite set, row 2 of the array shown in A178568. - Gary W. Adamson, May 29 2010
1/n = continued fraction [n]. Let barover[n] = [n,n,n,...] = 1/k. Then k - 1/k = n. Example: [2,2,2,...] = (sqrt(2) - 1) = 1/k, with k = (sqrt(2) + 1). Then 2 = k - 1/k. - Gary W. Adamson, Jul 15 2010
Number of n-digit numbers the binary expansion of which contains one run of 1's. - Vladimir Shevelev, Jul 30 2010
From Clark Kimberling, Jan 29 2011: (Start)
Let T denote the "natural number array A000027":
1 2 4 7 ...
3 5 8 12 ...
6 9 13 18 ...
10 14 19 25 ...
T(n,k) = n+(n+k-2)*(n+k-1)/2. See A185787 for a list of sequences based on T, such as rows, columns, diagonals, and sub-arrays. (End)
The Stern polynomial B(n,x) evaluated at x=2. See A125184. - T. D. Noe, Feb 28 2011
The denominator in the Maclaurin series of log(2), which is 1 - 1/2 + 1/3 - 1/4 + .... - Mohammad K. Azarian, Oct 13 2011
As a function of Bernoulli numbers B_n (cf. A027641: (1, -1/2, 1/6, 0, -1/30, 0, 1/42, ...)): let V = a variant of B_n changing the (-1/2) to (1/2). Then triangle A074909 (the beheaded Pascal's triangle) * [1, 1/2, 1/6, 0, -1/30, ...] = the vector [1, 2, 3, 4, 5, ...]. - Gary W. Adamson, Mar 05 2012
Number of partitions of 2n+1 into exactly two parts. - Wesley Ivan Hurt, Jul 15 2013
Integers n dividing u(n) = 2u(n-1) - u(n-2); u(0)=0, u(1)=1 (Lucas sequence A001477). - Thomas M. Bridge, Nov 03 2013
For this sequence, the generalized continued fraction a(1)+a(1)/(a(2)+a(2)/(a(3)+a(3)/(a(4)+...))), evaluates to 1/(e-2) = A194807. - Stanislav Sykora, Jan 20 2014
Engel expansion of e-1 (A091131 = 1.71828...). - Jaroslav Krizek, Jan 23 2014
a(n) is the number of permutations of length n simultaneously avoiding 213, 231 and 321 in the classical sense which are breadth-first search reading words of increasing unary-binary trees. For more details, see the entry for permutations avoiding 231 at A245898. - Manda Riehl, Aug 05 2014
a(n) is also the number of permutations simultaneously avoiding 213, 231 and 321 in the classical sense which can be realized as labels on an increasing strict binary tree with 2n-1 nodes. See A245904 for more information on increasing strict binary trees. - Manda Riehl, Aug 07 2014
a(n) = least k such that 2*Pi - Sum_{h=1..k} 1/(h^2 - h + 3/16) < 1/n. - Clark Kimberling, Sep 28 2014
a(n) = least k such that Pi^2/6 - Sum_{h=1..k} 1/h^2 < 1/n. - Clark Kimberling, Oct 02 2014
Determinants of the spiral knots S(2,k,(1)). a(k) = det(S(2,k,(1))). These knots are also the torus knots T(2,k). - Ryan Stees, Dec 15 2014
As a function, the restriction of the identity map on the nonnegative integers {0,1,2,3...}, A001477, to the positive integers {1,2,3,...}. - M. F. Hasler, Jan 18 2015
See also A131685(k) = smallest positive number m such that c(i) = m (i^1 + 1) (i^2 + 2) ... (i^k+ k) / k! takes integral values for all i>=0: For k=1, A131685(k)=1, which implies that this is a well defined integer sequence. - Alexander R. Povolotsky, Apr 24 2015
a(n) is the number of compositions of n+2 into n parts avoiding the part 2. - Milan Janjic, Jan 07 2016
Does not satisfy Benford's law [Berger-Hill, 2017] - N. J. A. Sloane, Feb 07 2017
Parametrization for the finite multisubsets of the positive integers, where, for p_j the j-th prime, n = Product_{j} p_j^(e_j) corresponds to the multiset containing e_j copies of j ('Heinz encoding' -- see A056239, A003963, A289506, A289507, A289508, A289509). - Christopher J. Smyth, Jul 31 2017
The arithmetic function v_1(n,1) as defined in A289197. - Robert Price, Aug 22 2017
For n >= 3, a(n)=n is the least area that can be obtained for an irregular octagon drawn in a square of n units side, whose sides are parallel to the axes, with 4 vertices that coincide with the 4 vertices of the square, and the 4 remaining vertices having integer coordinates. See Affaire de Logique link. - Michel Marcus, Apr 28 2018
a(n+1) is the order of rowmotion on a poset defined by a disjoint union of chains of length n. - Nick Mayers, Jun 08 2018
Number of 1's in n-th generation of 1-D Cellular Automata using Rules 50, 58, 114, 122, 178, 186, 206, 220, 238, 242, 250 or 252 in the Wolfram numbering scheme, started with a single 1. - Frank Hollstein, Mar 25 2019
(1, 2, 3, 4, 5, ...) is the fourth INVERT transform of (1, -2, 3, -4, 5, ...). - Gary W. Adamson, Jul 15 2019

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 1.
  • T. M. Apostol, Modular Functions and Dirichlet Series in Number Theory, Springer-Verlag, 1990, page 25.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 22.
  • W. Fulton and J. Harris, Representation theory: a first course, (1991), page 149. [From Leonid Bedratyuk, Jan 04 2010]
  • I. S. Gradstein and I. M. Ryshik, Tables of series, products, and integrals, Volume 1, Verlag Harri Deutsch, 1981.
  • R. E. Schwartz, You Can Count on Monsters: The First 100 numbers and Their Characters, A. K. Peters and MAA, 2010.
  • 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

A001477 = nonnegative numbers.
Partial sums of A000012.
Cf. A026081 = integers in reverse alphabetical order in U.S. English, A107322 = English name for number and its reverse have the same number of letters, A119796 = zero through ten in alphabetical order of English reverse spelling, A005589, etc. Cf. A185787 (includes a list of sequences based on the natural number array A000027).
Cf. Boustrophedon transforms: A000737, A231179;
Cf. A038722 (mirrored when seen as triangle), A056011 (boustrophedon).
Cf. A048993, A048994, A000110 (see the Feb 03 2015 formula).

Programs

Formula

a(2k+1) = A005408(k), k >= 0, a(2k) = A005843(k), k >= 1.
Multiplicative with a(p^e) = p^e. - David W. Wilson, Aug 01 2001
Another g.f.: Sum_{n>0} phi(n)*x^n/(1-x^n) (Apostol).
When seen as an array: T(k, n) = n+1 + (k+n)*(k+n+1)/2. Main diagonal is 2n*(n+1)+1 (A001844), antidiagonal sums are n*(n^2+1)/2 (A006003). - Ralf Stephan, Oct 17 2004
Dirichlet generating function: zeta(s-1). - Franklin T. Adams-Watters, Sep 11 2005
G.f.: x/(1-x)^2. E.g.f.: x*exp(x). a(n)=n. a(-n)=-a(n).
Series reversion of g.f. A(x) is x*C(-x)^2 where C(x) is the g.f. of A000108. - Michael Somos, Sep 04 2006
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = u^2 - v - 4*u*v. - Michael Somos, Oct 03 2006
Convolution of A000012 (the all-ones sequence) with itself. - Tanya Khovanova, Jun 22 2007
a(n) = 2*a(n-1)-a(n-2); a(1)=1, a(2)=2. a(n) = 1+a(n-1). - Philippe Deléham, Nov 03 2008
a(n) = A000720(A000040(n)). - Juri-Stepan Gerasimov, Nov 29 2009
a(n+1) = Sum_{k=0..n} A101950(n,k). - Philippe Deléham, Feb 10 2012
a(n) = Sum_{d | n} phi(d) = Sum_{d | n} A000010(d). - Jaroslav Krizek, Apr 20 2012
G.f.: x * Product_{j>=0} (1+x^(2^j))^2 = x * (1+2*x+x^2) * (1+2*x^2+x^4) * (1+2*x^4+x^8) * ... = x + 2x^2 + 3x^3 + ... . - Gary W. Adamson, Jun 26 2012
a(n) = det(binomial(i+1,j), 1 <= i,j <= n). - Mircea Merca, Apr 06 2013
E.g.f.: x*E(0), where E(k) = 1 + 1/(x - x^3/(x^2 + (k+1)/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 03 2013
From Wolfdieter Lang, Oct 09 2013: (Start)
a(n) = Product_{k=1..n-1} 2*sin(Pi*k/n), n > 1.
a(n) = Product_{k=1..n-1} (2*sin(Pi*k/(2*n)))^2, n > 1.
These identities are used in the calculation of products of ratios of lengths of certain lines in a regular n-gon. For the first identity see the Gradstein-Ryshik reference, p. 62, 1.392 1., bringing the first factor there to the left hand side and taking the limit x -> 0 (L'Hôpital). The second line follows from the first one. Thanks to Seppo Mustonen who led me to consider n-gon lengths products. (End)
a(n) = Sum_{j=0..k} (-1)^(j-1)*j*binomial(n,j)*binomial(n-1+k-j,k-j), k>=0. - Mircea Merca, Jan 25 2014
a(n) = A052410(n)^A052409(n). - Reinhard Zumkeller, Apr 06 2014
a(n) = Sum_{k=1..n^2+2*n} 1/(sqrt(k)+sqrt(k+1)). - Pierre CAMI, Apr 25 2014
a(n) = floor(1/sin(1/n)) = floor(cot(1/(n+1))) = ceiling(cot(1/n)). - Clark Kimberling, Oct 08 2014
a(n) = floor(1/(log(n+1)-log(n))). - Thomas Ordowski, Oct 10 2014
a(k) = det(S(2,k,1)). - Ryan Stees, Dec 15 2014
a(n) = 1/(1/(n+1) + 1/(n+1)^2 + 1/(n+1)^3 + ...). - Pierre CAMI, Jan 22 2015
a(n) = Sum_{m=0..n-1} Stirling1(n-1,m)*Bell(m+1), for n >= 1. This corresponds to Bell(m+1) = Sum_{k=0..m} Stirling2(m, k)*(k+1), for m >= 0, from the fact that Stirling2*Stirling1 = identity matrix. See A048993, A048994 and A000110. - Wolfdieter Lang, Feb 03 2015
a(n) = Sum_{k=1..2n-1}(-1)^(k+1)*k*(2n-k). In addition, surprisingly, a(n) = Sum_{k=1..2n-1}(-1)^(k+1)*k^2*(2n-k)^2. - Charlie Marion, Jan 05 2016
G.f.: x/(1-x)^2 = (x * r(x) *r(x^3) * r(x^9) * r(x^27) * ...), where r(x) = (1 + x + x^2)^2 = (1 + 2x + 3x^2 + 2x^3 + x^4). - Gary W. Adamson, Jan 11 2017
a(n) = floor(1/(Pi/2-arctan(n))). - Clark Kimberling, Mar 11 2020
a(n) = Sum_{d|n} mu(n/d)*sigma(d). - Ridouane Oudra, Oct 03 2020
a(n) = Sum_{k=1..n} phi(gcd(n,k))/phi(n/gcd(n,k)). - Richard L. Ollerton, May 09 2021
a(n) = S(n-1, 2), with the Chebyshev S-polynomials A049310. - Wolfdieter Lang, Mar 09 2023
From Peter Bala, Nov 02 2024: (Start)
For positive integer m, a(n) = (1/m)* Sum_{k = 1..2*m*n-1} (-1)^(k+1) * k * (2*m*n - k) = (1/m) * Sum_{k = 1..2*m*n-1} (-1)^(k+1) * k^2 * (2*m*n - k)^2 (the case m = 1 is given above).
a(n) = Sum_{k = 0..3*n} (-1)^(n+k+1) * k * binomial(3*n+k, 2*k). (End)

Extensions

Links edited by Daniel Forgues, Oct 07 2009.

A008949 Triangle read by rows of partial sums of binomial coefficients: T(n,k) = Sum_{i=0..k} binomial(n,i) (0 <= k <= n); also dimensions of Reed-Muller codes.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 1, 4, 7, 8, 1, 5, 11, 15, 16, 1, 6, 16, 26, 31, 32, 1, 7, 22, 42, 57, 63, 64, 1, 8, 29, 64, 99, 120, 127, 128, 1, 9, 37, 93, 163, 219, 247, 255, 256, 1, 10, 46, 130, 256, 382, 466, 502, 511, 512, 1, 11, 56, 176, 386, 638, 848, 968, 1013, 1023, 1024, 1, 12, 67, 232, 562, 1024, 1486, 1816, 1981, 2036, 2047, 2048
Offset: 0

Views

Author

Keywords

Comments

The second-left-from-middle column is A000346: T(2n+2, n) = A000346(n). - Ed Catmur (ed(AT)catmur.co.uk), Dec 09 2006
T(n,k) is the maximal number of regions into which n hyperplanes of co-dimension 1 divide R^k (the Cake-Without-Icing numbers). - Rob Johnson, Jul 27 2008
T(n,k) gives the number of vertices within distance k (measured along the edges) of an n-dimensional unit cube, (i.e., the number of vertices on the hypercube graph Q_n whose distance from a reference vertex is <= k). - Robert Munafo, Oct 26 2010
A triangle formed like Pascal's triangle, but with 2^n for n >= 0 on the right border instead of 1. - Boris Putievskiy, Aug 18 2013
For a closed-form formula for generalized Pascal's triangle see A228576. - Boris Putievskiy, Sep 04 2013
Consider each "1" as an apex of two sequences: the first is the set of terms in the same row as the "1", but the rightmost term in the row repeats infinitely. Example: the row (1, 4, 7, 8) becomes (1, 4, 7, 8, 8, 8, ...). The second sequence begins with the same "1" but is the diagonal going down and to the right, thus: (1, 5, 16, 42, 99, 219, 466, ...). It appears that for all such sequence pairs, the binomial transform of the first, (1, 4, 7, 8, 8, 8, ...) in this case; is equal to the second: (1, 5, 16, 42, 99, ...). - Gary W. Adamson, Aug 19 2015
Let T* be the infinite tree with root 0 generated by these rules: if p is in T*, then p+1 is in T* and x*p is in T*. Let q(n) be the sum of polynomials in the n-th generation of T*. For n >= 0, row n of A008949 gives the coefficients of q(n+1); e.g., (row 3) = (1, 4, 7, 8) matches x^3 + 4*x^2 + 7*x + 9, which is the sum of the 8 polynomials in the 4th generation of T*. - Clark Kimberling, Jun 16 2016
T(n,k) is the number of subsets of [n]={1,...,n} of at most size k. Equivalently, T(n,k) is the number of subsets of [n] of at least size n-k. Counting the subsets of at least size (n-k) by conditioning on the largest element m of the smallest (n-k) elements of such a subset provides the formula T(n,k) = Sum_{m=n-k..n} C(m-1,n-k-1)*2^(n-m), and, by letting j=m-n+k, we obtain T(n,k) = Sum_{j=0..k} C(n+j-k-1,j)*2^(k-j). - Dennis P. Walsh, Sep 25 2017
If the interval of integers 1..n is shifted up or down by k, making the new interval 1+k..n+k or 1-k..n-k, then T(n-1,n-1-k) (= 2^(n-1)-T(n-1,k-1)) is the number of subsets of the new interval that contain their own cardinal number as an element. - David Pasino, Nov 01 2018

Examples

			Triangle begins:
  1;
  1,  2;
  1,  3,  4;
  1,  4,  7,   8;
  1,  5, 11,  15,  16;
  1,  6, 16,  26,  31,  32;
  1,  7, 22,  42,  57,  63,  64;
  1,  8, 29,  64,  99, 120, 127, 128;
  1,  9, 37,  93, 163, 219, 247, 255,  256;
  1, 10, 46, 130, 256, 382, 466, 502,  511,  512;
  1, 11, 56, 176, 386, 638, 848, 968, 1013, 1023, 1024;
  ...
		

References

  • F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier-North Holland, 1978, p. 376.

Crossrefs

Row sums sequence is A001792.
T(n, m)= A055248(n, n-m).

Programs

  • GAP
    T:=Flat(List([0..11],n->List([0..n],k->Sum([0..k],j->Binomial(n+j-k-1,j)*2^(k-j))))); # Muniru A Asiru, Nov 25 2018
    
  • Haskell
    a008949 n k = a008949_tabl !! n !! k
    a008949_row n = a008949_tabl !! n
    a008949_tabl = map (scanl1 (+)) a007318_tabl
    -- Reinhard Zumkeller, Nov 23 2012
    
  • Magma
    [[(&+[Binomial(n,j): j in [0..k]]): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Nov 25 2018
    
  • Maple
    A008949 := proc(n,k) local i; add(binomial(n,i),i=0..k) end; # Typo corrected by R. J. Mathar, Oct 26 2010
  • Mathematica
    Table[Length[Select[Subsets[n], (Length[ # ] <= k) &]], {n, 0, 12}, {k, 0, n}] // Grid (* Geoffrey Critzer, May 13 2009 *)
    Flatten[Accumulate/@Table[Binomial[n,i],{n,0,20},{i,0,n}]] (* Harvey P. Dale, Aug 08 2015 *)
    T[ n_, k_] := If[ n < 0 || k > n, 0, Binomial[n, k] Hypergeometric2F1[1, -k, n + 1 - k, -1]]; (* Michael Somos, Aug 05 2017 *)
  • PARI
    A008949(n)=T8949(t=sqrtint(2*n-sqrtint(2*n)),n-t*(t+1)/2)
    T8949(r,c)={ 2*c > r || return(sum(i=0,c,binomial(r,i))); 1<M. F. Hasler, May 30 2010
    
  • PARI
    {T(n, k) = if(k>n, 0, sum(i=0, k, binomial(n, i)))}; /* Michael Somos, Aug 05 2017 */
    
  • PARI
    row(n) = my(v=vector(n+1, k, binomial(n,k-1))); vector(#v, k, sum(i=1, k, v[i])); \\ Michel Marcus, Apr 13 2025
    
  • Sage
    [[sum(binomial(n,j) for j in range(k+1)) for k in range(n+1)] for n in range(12)] # G. C. Greubel, Nov 25 2018

Formula

From partial sums across rows of Pascal triangle A007318.
T(n, 0) = 1, T(n, n) = 2^n, T(n, k) = T(n-1, k-1) + T(n-1, k), 0 < k < n.
G.f.: (1 - x*y)/((1 - y - x*y)*(1 - 2*x*y)). - Antonio Gonzalez (gonfer00(AT)gmail.com), Sep 08 2009
T(2n,n) = A032443(n). - Philippe Deléham, Sep 16 2009
T(n,k) = 2 T(n-1,k-1) + binomial(n-1,k) = 2 T(n-1,k) - binomial(n-1,k). - M. F. Hasler, May 30 2010
T(n,k) = binomial(n,n-k)* 2F1(1, -k; n+1-k; -1). - Olivier Gérard, Aug 02 2012
For a closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - Boris Putievskiy, Aug 18 2013
T(n,floor(n/2)) = A027306(n). - Reinhard Zumkeller, Nov 14 2014
T(n,n) = 2^n, otherwise for 0 <= k <= n-1, T(n,k) = 2^n - T(n,n-k-1). - Bob Selcoe, Mar 30 2017
For fixed j >= 0, lim_{n -> oo} T(n+1,n-j+1)/T(n,n-j) = 2. - Bob Selcoe, Apr 03 2017
T(n,k) = Sum_{j=0..k} C(n+j-k-1,j)*2^(k-j). - Dennis P. Walsh, Sep 25 2017

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 23 2000

A006261 a(n) = Sum_{k=0..5} binomial(n,k).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 63, 120, 219, 382, 638, 1024, 1586, 2380, 3473, 4944, 6885, 9402, 12616, 16664, 21700, 27896, 35443, 44552, 55455, 68406, 83682, 101584, 122438, 146596, 174437, 206368, 242825, 284274, 331212, 384168, 443704, 510416, 584935, 667928, 760099, 862190
Offset: 0

Views

Author

N. J. A. Sloane, based on a suggestion from S. C. Chan, Jun 10 1975

Keywords

Comments

a(n) is the sum of the first six terms of the n-th row in Pascal's triangle. - Geoffrey Critzer, Jan 19 2009
Also the interpolating polynomial for the divisors of 32: {a(k): 0 <= k < 6} = {1,2,4,8,16,32}. - Reinhard Zumkeller, Jun 17 2009
a(n) is the maximal number of regions in 5-space formed by n-1 4-dimensional hypercubes. - Carl Schildkraut, May 26 2015
a(n) is the number of binary words of length n matching the regular expression 1*0*1*0*1*0*. A000124, A000125, A000127 count binary words of the form 0*1*0*, 1*0*1*0*, and 0*1*0*1*0*, respectively. - Manfred Scheucher, Jun 22 2023

Examples

			a(7) = 120 because the first six terms in the 7th row of Pascal's triangle 1 + 7 + 21 + 35 + 35 + 21 = 120. - _Geoffrey Critzer_, Jan 19 2009
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006261 = sum . take 6 . a007318_row  -- Reinhard Zumkeller, Nov 24 2012
    
  • Magma
    [(n^5 - 5*n^4 + 25*n^3 + 5*n^2 + 94*n + 120)/120: n in [0..40]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    A006261:=(z**2-z+1)*(3*z**2-3*z+1)/(z-1)**6; # Simon Plouffe in his 1992 dissertation
  • Mathematica
    CoefficientList[
      Series[(1 + x + x^2/2 + x^3/6 + x^4/24 + x^5/120) Exp[x], {x, 0,
        52}], x]*Table[n!, {n, 0, 52}]
  • PARI
    a(n)=sum(k=0,5,binomial(n,k)) \\ Charles R Greathouse IV, Apr 08 2016
  • Python
    A006261_list, m = [], [1, -3, 4, -2, 1, 1]
    for _ in range(10**2):
        A006261_list.append(m[-1])
        for i in range(5):
            m[i+1] += m[i] # Chai Wah Wu, Jan 24 2016
    
  • Sage
    [binomial(n,1)+binomial(n,3)+binomial(n,5) for n in range(1, 38)] # Zerinvary Lajos, May 17 2009
    

Formula

a(n) = A057703(n) + 1.
a(n) = binomial(n+1, 5) + binomial(n+1, 3) + binomial(n+1, 1). - Len Smiley, Oct 20 2001
G.f.: (1 - 4*x + 7*x^2 - 6*x^3 + 3*x^4)/(1-x)^6. - Geoffrey Critzer, Jan 19 2009
E.g.f.: (1 + x + x^2/2 + x^3/6 + x^4/24 + x^5/120)*exp(x).
a(n) = (n^5 - 5*n^4 + 25*n^3 + 5*n^2 + 94*n + 120)/120. - Reinhard Zumkeller, Jun 17 2009
a(n) = a(n-1) + A000127(n-1). - Christian Schroeder, Jan 04 2016

A004070 Table of Whitney numbers W(n,k) read by antidiagonals, where W(n,k) is maximal number of pieces into which n-space is sliced by k hyperplanes, n >= 0, k >= 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 4, 4, 1, 1, 2, 4, 7, 5, 1, 1, 2, 4, 8, 11, 6, 1, 1, 2, 4, 8, 15, 16, 7, 1, 1, 2, 4, 8, 16, 26, 22, 8, 1, 1, 2, 4, 8, 16, 31, 42, 29, 9, 1, 1, 2, 4, 8, 16, 32, 57, 64, 37, 10, 1, 1, 2, 4, 8, 16, 32, 63, 99, 93, 46, 11, 1, 1, 2, 4, 8, 16, 32, 64, 120, 163
Offset: 0

Views

Author

Keywords

Comments

As a number triangle, this is given by T(n,k)=sum{j=0..n, C(n,j)(-1)^(n-j)sum{i=0..j, C(j+k,i-k)}}. - Paul Barry, Aug 23 2004
As a number triangle, this is the Riordan array (1/(1-x), x(1+x)) with T(n,k)=sum{i=0..n, binomial(k,i-k)}. Diagonal sums are then A023434(n+1). - Paul Barry, Feb 16 2005
Form partial sums across rows of square array of binomial coefficients A026729; see also A008949. - Philippe Deléham, Aug 28 2005
Square array A026729 -> Partial sums across rows
1 0 0 0 0 0 0 . . . . 1 1 1 1 1 1 1 . . . . . .
1 1 0 0 0 0 0 . . . . 1 2 2 2 2 2 2 . . . . . .
1 2 1 0 0 0 0 . . . . 1 3 4 4 4 4 4 . . . . . .
1 3 3 1 0 0 0 . . . . 1 4 7 8 8 8 8 . . . . . .
For other Whitney numbers see A007799.
W(n,k) is the number of length k binary sequences containing no more than n 1's. - Geoffrey Critzer, Mar 15 2010
From Emeric Deutsch, Jun 15 2010: (Start)
Viewed as a number triangle, T(n,k) is the number of internal nodes of the Fibonacci tree of order n+2 at level k. A Fibonacci tree of order n (n>=2) is a complete binary tree whose left subtree is the Fibonacci tree of order n-1 and whose right subtree is the Fibonacci tree of order n-2; each of the Fibonacci trees of order 0 and 1 is defined as a single node.
(End)
Named after the American mathematician Hassler Whitney (1907-1989). - Amiram Eldar, Jun 13 2021

Examples

			Table W(n,k) begins:
  1 1 1 1  1  1  1 ...
  1 2 3 4  5  6  7 ...
  1 2 4 7 11 16 22 ...
  1 2 4 8 15 26 42 ...
W(2,4) = 11 because there are 11 length 4 binary sequences containing no more than 2 1's: {0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}, {0, 1, 0, 0}, {0, 1, 0, 1}, {0, 1, 1, 0}, {1, 0, 0, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}, {1, 1, 0, 0}. - _Geoffrey Critzer_, Mar 15 2010
Table T(n, k) begins:
  1
  1  1
  1  2  1
  1  2  3  1
  1  2  4  4  1
  1  2  4  7  5  1
  1  2  4  8 11  6  1
...
		

References

  • Donald E. Knuth, The Art of Computer Programming, Vol. 3, 2nd edition, Addison-Wesley, Reading, MA, 1998, p. 417.

Crossrefs

Cf. A007799. As a triangle, mirror A052509.
Rows converge to powers of two (A000079). Subdiagonals include A000225, A000295, A002662, A002663, A002664, A035038, A035039, A035040, A035041, A035042. Antidiagonal sums are A000071.

Programs

  • Mathematica
    Transpose[ Table[Table[Sum[Binomial[n, k], {k, 0, m}], {m, 0, 15}], {n, 0, 15}]] // Grid (* Geoffrey Critzer, Mar 15 2010 *)
    T[ n_, k_] := Sum[ Binomial[n, j] (-1)^(n - j) Sum[ Binomial[j + k, i - k], {i, 0, j}], {j, 0, n}]; (* Michael Somos, May 31 2016 *)
  • PARI
    /* array read by antidiagonals up coordinate index functions */
    t1(n) = binomial(floor(3/2 + sqrt(2+2*n)), 2) - (n+1); /* A025581 */
    t2(n) = n - binomial(floor(1/2 + sqrt(2+2*n)), 2); /* A002262 */
    /* define the sequence array function for A004070 */
    W(n, k) = sum(i=0, n, binomial(k, i));
    /* visual check ( origin 0,0 ) */
    printp(matrix(7, 7, n, k, W(n-1, k-1)));
    /* print the sequence entries by antidiagonals going up ( origin 0,0 ) */
    print1("S A004070 "); for(n=0, 32, print1(W(t1(n), t2(n))","));
    print1("T A004070 "); for(n=33, 61, print1(W(t1(n), t2(n))","));
    print1("U A004070 "); for(n=62, 86, print1(W(t1(n), t2(n))",")); /* Michael Somos, Apr 28 2000 */
    
  • PARI
    T(n, k)=sum(m=0, n-k, binomial(k, m)) \\ Jianing Song, May 30 2022

Formula

W(n, k) = Sum_{i=0..n} binomial(k, i). - Bill Gosper
W(n, k) = if k=0 or n=0 then 1 else W(n, k-1)+W(n-1, k-1). - David Broadhurst, Jan 05 2000
The table W(n,k) = A000012 * A007318(transform), where A000012 = (1; 1,1; 1,1,1; ...). - Gary W. Adamson, Nov 15 2007
E.g.f. for row n: (1 + x + x^2/2! + ... + x^n/n!)* exp(x). - Geoffrey Critzer, Mar 15 2010
G.f.: 1 / (1 - x - x*y*(1 - x^2)) = Sum_{0 <= k <= n} x^n * y^k * T(n, k). - Michael Somos, May 31 2016
W(n, n) = 2^n. - Michael Somos, May 31 2016
From Jianing Song, May 30 2022: (Start)
T(n, 0) = T(n, n) = 1 for n >= 0; T(n, k) = T(n-1, k-1) + T(n-2, k-1) for k=1, 2, ..., n-1, n >= 2.
T(n, k) = Sum_{m=0..n-k} binomial(k, m).
T(n,k) = 2^k for 0 <= k <= floor(n/2). (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 20 2000

A008859 a(n) = Sum_{k=0..6} binomial(n,k).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 127, 247, 466, 848, 1486, 2510, 4096, 6476, 9949, 14893, 21778, 31180, 43796, 60460, 82160, 110056, 145499, 190051, 245506, 313912, 397594, 499178, 621616, 768212, 942649, 1149017, 1391842, 1676116, 2007328
Offset: 0

Views

Author

Keywords

Comments

a(n) is the maximal number of regions in 6-space formed by n-1 5-dimensional hypercubes. - Christian Schroeder, Jan 04 2016
a(n) is the number of binary words of length n matching the regular expression 0*1*0*1*0*1*0*. A000124, A000125, A000127, A006261 count binary words of the form 0*1*0*, 1*0*1*0*, 0*1*0*1*0*, and 1*0*1*0*1*0*, respectively. - Manfred Scheucher, Jun 22 2023

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.

Crossrefs

Programs

  • GAP
    List([0..40], n-> Sum([0..6], k-> Binomial(n,k)) ); # G. C. Greubel, Sep 13 2019
  • Haskell
    a008859 = sum . take 7 . a007318_row  -- Reinhard Zumkeller, Nov 24 2012
    
  • Magma
    [(&+[Binomial(n,k): k in [0..6]]): n in [0..40]]; // G. C. Greubel, Sep 13 2019
    
  • Maple
    A008859 := proc(n)
        add(binomial(n,k),k=0..6) ;
    end proc: # R. J. Mathar, Oct 30 2015
  • Mathematica
    Table[Sum[Binomial[n,k],{k,0,6}],{n,0,40}] (* Harvey P. Dale, Jan 16 2012 *)
  • PARI
    a(n)=sum(k=0,6,binomial(n,k)) \\ Charles R Greathouse IV, Sep 24 2015
    
  • Sage
    [sum(binomial(n,k) for k in (0..6)) for n in (0..40)] # G. C. Greubel, Sep 13 2019
    

Formula

a(n) = Sum_{k=0..3} binomial(n+1, 2*k). - Len Smiley, Oct 20 2001
O.g.f.: (1 - 5*x + 11*x^2 - 13*x^3 + 9*x^4 - 3*x^5 + x^6)/(1-x)^7. - R. J. Mathar, Apr 02 2008
a(n) = a(n-1) + A006261(n-1). - Christian Schroeder, Jan 04 2016
a(n) = (n^6 - 9*n^5 + 55*n^4 - 75*n^3 + 304*n^2 + 444*n + 720)/720. - Gerry Martens , May 04 2016
E.g.f.: (720 + 720*x + 360*x^2 + 120*x^3 + 30*x^4 + 6*x^5 + x^6)*exp(x)/6!. - Ilya Gutkovskiy, May 04 2016

A008860 a(n) = Sum_{k=0..7} binomial(n,k).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 255, 502, 968, 1816, 3302, 5812, 9908, 16384, 26333, 41226, 63004, 94184, 137980, 198440, 280600, 390656, 536155, 726206, 971712, 1285624, 1683218, 2182396, 2804012, 3572224, 4514873, 5663890, 7055732
Offset: 0

Views

Author

Keywords

Comments

This is a general comment about sequences: A000012, A000027, A000124, A000125, A000127, A006261, A008859, this sequence, A008861, A008862, A008863. Let j in {1, 2, ..., 11} index these 11 sequences respective to their order above. Then a(n) in each sequence is the number of compositions of (n+1) into j or fewer parts. From this we see that the ordinary generating function for each sequence is Sum_{i=0..j-1} x^i/(1-x)^(i+1). - Geoffrey Critzer, Jan 19 2009
a(n) is the maximal number of regions in 7-space formed by n-1 6-dimensional hypercubes. Also the number of binary words of length n matching the regular expression 1*0*1*0*1*0*1*0*. A000124, A000125, A000127, A006261, A008859 count binary words of the form 0*1*0*, 1*0*1*0*, 0*1*0*1*0*, 1*0*1*0*1*0*, and 0*1*0*1*0*1*0* respectively. - Manfred Scheucher, Jun 22 2023

Examples

			a(8)=255 because there are 255 compositions of 9 into eight or fewer parts. - _Geoffrey Critzer_, Jan 23 2009
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.

Crossrefs

Programs

  • GAP
    List([0..40], n-> Sum([0..7], k-> Binomial(n,k)) ); # G. C. Greubel, Sep 13 2019
  • Haskell
    a008860 = sum . take 8 . a007318_row  -- Reinhard Zumkeller, Nov 24 2012
    
  • Magma
    [&+[Binomial(n, k): k in [0..7]]: n in [0..55]]; // Vincenzo Librandi, May 20 2019
    
  • Maple
    seq(sum(binomial(n,j), j=0..7), n=0..40); # G. C. Greubel, Sep 13 2019
  • Mathematica
    CoefficientList[Series[(1-6x+16x^2-24x^3+22x^4-12x^5+4x^6)/(1-x)^8, {x, 0, 34}], x] (* Georg Fischer, May 19 2019 *)
    Sum[Binomial[Range[41]-1, j-1], {j,8}] (* G. C. Greubel, Sep 13 2019 *)
  • PARI
    a(n)=(n+1)*(n^6-15*n^5+127*n^4-477*n^3+1576*n^2-1212*n+5040)/5040 \\ Charles R Greathouse IV, Dec 07 2011
    
  • Sage
    [binomial(n,1)+binomial(n,3)+binomial(n,5)+binomial(n,7) for n in range(1, 36)] # Zerinvary Lajos, May 17 2009
    
  • Sage
    [sum(binomial(n,k) for k in (0..7)) for n in (0..40)] # G. C. Greubel, Sep 13 2019
    

Formula

a(n) = Sum_{k=1..4} binomial(n+1, 2k-1) = (n^6 - 14*n^5 + 112*n^4 - 350*n^3 + 1099*n^2 + 364*n + 3828)*n/5040 + 1. [Len Smiley's formula for A006261, copied by Frank Ellermann]
G.f.: (1 - 6*x + 16*x^2 - 24*x^3 + 22*x^4 - 12*x^5 + 4*x^6)/(1-x)^8. - Geoffrey Critzer, Jan 19 2009 [Corrected by Georg Fischer, May 19 2019]

A008863 a(n) = Sum_{k=0..10} binomial(n,k).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2047, 4083, 8100, 15914, 30827, 58651, 109294, 199140, 354522, 616666, 1048576, 1744436, 2842226, 4540386, 7119516, 10970272, 16628809, 24821333, 36519556, 53009102, 75973189, 107594213, 150676186, 208791332
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of compositions (ordered partitions) of n+1 into eleven or fewer parts. - Geoffrey Critzer, Jan 24 2009
a(n) is the maximal number of regions in 10-space formed by n-1 9-dimensional hypercubes. Also the number of binary words of length n matching the regular expression 0*1*0*1*0*1*0*1*0*1*0*. A000124, A000125, A000127, A006261, A008859, A008860, A008861, A008862 count binary words of the form 0*1*0*, 1*0*1*0*, 0*1*0*1*0*, 1*0*1*0*1*0*, 0*1*0*1*0*1*0*, 1*0*1*0*1*0*1*0*, 0*1*0*1*0*1*0*1*0* and 1*0*1*0*1*0*1*0*1*0* respectively. - Manfred Scheucher, Jun 23 2023

Examples

			a(11) = 2047 because there are 2^11=2048 compositions of 12 into any size parts but one of the compositions (1+1+...+1=12) has more than eleven parts. - _Geoffrey Critzer_, Jan 24 2009
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.

Crossrefs

Programs

  • GAP
    List([0..40], n-> Sum([0..10], k-> Binomial(n,k)) ); # G. C. Greubel, Sep 13 2019
  • Haskell
    a008863 = sum . take 11 . a007318_row  -- Reinhard Zumkeller, Nov 24 2012
    
  • Magma
    [(&+[Binomial(n,k): k in [0..10]]): n in [0..40]]; // G. C. Greubel, Sep 13 2019
    
  • Maple
    A008863:=n->add(binomial(n,k), k=0..10): seq(A008863(n), n=0..40); # Wesley Ivan Hurt, Apr 28 2017
  • Mathematica
    Table[Sum[Binomial[n, i], {i, 0, 10}], {n, 0, 40}] (* T. D. Noe, Mar 27 2012 *)
    LinearRecurrence[{11,-55,165,-330,462,-462,330,-165,55,-11,1},{1,2,4,8, 16,32,64,128,256,512,1024}, 40] (* Harvey P. Dale, Apr 25 2012 *)
  • PARI
    a(n)=sum(k=0,10,binomial(n,k)) \\ Charles R Greathouse IV, Apr 07 2016
    
  • Python
    A008863_list, m = [], [1, -8, 29, -62, 86, -80, 50, -20, 5, 0, 1]
    for _ in range(10**2):
        A008863_list.append(m[-1])
        for i in range(10):
            m[i+1] += m[i] # Chai Wah Wu, Jan 24 2016
    
  • Sage
    [sum(binomial(n,k) for k in (0..10)) for n in (0..40)] # G. C. Greubel, Sep 13 2019
    

Formula

a(n) = Sum_{k=0..5} binomial(n+1, 2k), compare A008859.
From Geoffrey Critzer, Jan 24 2009: (Start)
G.f.: (1 - 9*x + 37*x^2 - 91*x^3 + 148*x^4 - 166*x^5 + 130*x^6 - 70*x^7 + 25*x^8 - 5*x^9 + x^10)/(1-x)^11.
a(n) = (n^10 - 35*n^9 + 600*n^8 - 5790*n^7 + 36813*n^6 - 140595*n^5 + 408050*n^4 - 382060*n^3 + 1368936*n^2 + 2342880*n + 3628800)/10!. (End)
a(n) = 11*a(n-1) - 55*a(n-2) + 165*a(n-3) - 330*a(n-4) + 462*a(n-5) - 462*a(n-6) + 330*a(n-7) - 165*a(n-8) + 55*a(n-9) - 11*a(n-10) + a(n-11); a(0)=1, a(1)=2, a(2)=4, a(3)=8, a(4)=16, a(5)=32, a(6)=64, a(7)=128, a(8)=256, a(9)=512, a(10)=1024. - Harvey P. Dale, Apr 25 2012

A008862 a(n) = Sum_{k=0..9} binomial(n,k).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1023, 2036, 4017, 7814, 14913, 27824, 50643, 89846, 155382, 262144, 431910, 695860, 1097790, 1698160, 2579130, 3850756, 5658537, 8192524, 11698223, 16489546, 22964087, 31621024, 43081973, 58115146, 77663192, 102875128
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of compositions (ordered partitions) of n+1 into ten or fewer parts. - Geoffrey Critzer, Jan 24 2009
a(n) is the maximal number of regions in 9-space formed by n-1 8-dimensional hypercubes. Also the number of binary words of length n matching the regular expression 1*0*1*0*1*0*1*0*1*0*. A000124, A000125, A000127, A006261, A008859, A008860, A008861 count binary words of the form 0*1*0*, 1*0*1*0*, 0*1*0*1*0*, 1*0*1*0*1*0*, 0*1*0*1*0*1*0*, 1*0*1*0*1*0*1*0* and 0*1*0*1*0*1*0*1*0* respectively. - Manfred Scheucher, Jun 23 2023

Examples

			a(10)=1023 because there are (2^10)-1 compositions of 11 into ten or fewer parts. - _Geoffrey Critzer_, Jan 24 2009
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.

Crossrefs

Programs

  • GAP
    List([0..40], n-> Sum([0..9], k-> Binomial(n,k)) ); # G. C. Greubel, Sep 13 2019
  • Haskell
    a008862 = sum . take 10 . a007318_row  -- Reinhard Zumkeller, Nov 24 2012
    
  • Magma
    [(&+[Binomial(n,k): k in [0..9]]): n in [0..40]]; // G. C. Greubel, Sep 13 2019
    
  • Maple
    seq(add(binomial(n,j), j=0..9), n=0..40); # G. C. Greubel, Sep 13 2019
  • Mathematica
    Table[Sum[Binomial[n,k],{k,0,9}],{n,0,40}] (* or *) LinearRecurrence[ {10,-45,120,-210,252,-210,120,-45,10,-1}, {1,2,4,8,16,32,64,128,256, 512}, 40] (* Harvey P. Dale, Mar 18 2012 *)
  • PARI
    vector(40, n, sum(j=0,9, binomial(n-1,j))) \\ G. C. Greubel, Sep 13 2019
    
  • Sage
    [sum(binomial(n,k) for k in (0..9)) for n in (0..40)] # G. C. Greubel, Sep 13 2019
    

Formula

a(n) = Sum_{k=1..5} binomial(n+1, 2*k-1), compare A008860.
From Geoffrey Critzer, Jan 24 2009: (Start)
G.f.: (1 - 8*x + 29*x^2 - 62*x^3 + 86*x^4 - 80*x^5 + 50*x^6 - 20*x^7 + 5*x^8)/(1-x)^10.
a(n) = (n^9 - 27*n^8 + 366*n^7 - 2646*n^6 + 12873*n^5 - 31563*n^4 + 79064*n^3 + 34236*n^2 + 270576*n + 362880)/9!. (End)
a(n) = 10*a(n-1) - 45*a(n-2) + 120*a(n-3) - 210*a(n-4) + 252*a(n-5) - 210*a(n-6) + 120*a(n-7) - 45*a(n-8) + 10*a(n-9) - a(n-10); a(0)=1, a(1)=2, a(2)=4, a(3)=8, a(4)=16, a(5)=32, a(6)=64, a(7)=128, a(8)=256, a(9)=512. - Harvey P. Dale, Mar 18 2012

A219531 a(n) = Sum_{k=0..11} C(n, k).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4095, 8178, 16278, 32192, 63019, 121670, 230964, 430104, 784626, 1401292, 2449868, 4194304, 7036530, 11576916, 18696432, 29666704, 46295513, 71116846, 107636402, 160645504, 236618693, 344212906, 494889092
Offset: 0

Views

Author

Mokhtar Mohamed, Nov 21 2012

Keywords

Comments

a(n) is the number of compositions (ordered partitions) of n+1 into twelve or fewer parts. a(n) = sum(binomial(n + 1, 2k - 1), for k = 1 .. 6). a(n) is the sum of the first twelve terms in the n-th row of Pascal's triangle.

Crossrefs

Programs

  • GAP
    List([0..40], n-> Sum([0..11], k-> Binomial(n,k)) ); # G. C. Greubel, Sep 13 2019
  • Haskell
    a219531 = sum . take 12 . a007318_row  -- Reinhard Zumkeller, Nov 24 2012
    
  • Magma
    [(&+[Binomial(n,k): k in [0..11]]): n in [0..40]]; // G. C. Greubel, Sep 13 2019
    
  • Maple
    seq(sum(binomial(n,j), j=0..11), n=0..40); # G. C. Greubel, Sep 13 2019
  • Mathematica
    Table[Sum[Binomial[n, k], {k, 0, 11}], {n, 0, 40}] (* T. D. Noe, Nov 23 2012 *)
    LinearRecurrence[{12,-66,220,-495,792,-924,792,-495,220,-66,12,-1},{1,2,4,8,16,32,64,128,256,512,1024,2048},40] (* Harvey P. Dale, Sep 19 2019 *)
  • PARI
    vector(40, n, sum(j=0,11, binomial(n-1,j))) \\ G. C. Greubel, Sep 13 2019
    
  • Python
    A219531_list, m = [], [1, -9, 37, -91, 148, -166, 130, -70, 25, -5, 1, 1]
    for _ in range(10**2):
        A219531_list.append(m[-1])
        for i in range(11):
            m[i+1] += m[i] # Chai Wah Wu, Jan 24 2016
    
  • Sage
    [sum(binomial(n,k) for k in (0..11)) for n in (0..40)] # G. C. Greubel, Sep 13 2019
    

Formula

a(n) = 1 + (n^11 - 44*n^10 + 935*n^9 - 11550*n^8 + 94083*n^7 - 497112*n^6 +1870385*n^5 -3920950*n^4 +8550916*n^3 +4429656*n^2 +29400480*n)/11!. a(n) = 2*a(n - 1), for 1 <= n <= 11 with a(0) = 1, a(n) = 2*a(n - 1) - C(n - 1, 11), for n > 11. - Mohamed
G.f.: (1 - 10*x + 46*x^2 - 128*x^3 + 239*x^4 - 314*x^5 + 296*x^6 - 200*x^7 + 95*x^8 - 30*x^9 + 6*x^10)/(1-x)^12. - Mokhtar Mohamed, Nov 23 2012

A058393 A square array based on 1^n (A000012) with each term being the sum of 2 consecutive terms in the previous row.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 0, 1, 2, 1, 1, 1, 2, 3, 1, 0, 1, 2, 4, 4, 1, 1, 1, 2, 4, 7, 5, 1, 0, 1, 2, 4, 8, 11, 6, 1, 1, 1, 2, 4, 8, 15, 16, 7, 1, 0, 1, 2, 4, 8, 16, 26, 22, 8, 1, 1, 1, 2, 4, 8, 16, 31, 42, 29, 9, 1, 0, 1, 2, 4, 8, 16, 32, 57, 64, 37, 10, 1, 1, 1, 2, 4, 8, 16, 32, 63, 99, 93, 46, 11, 1, 0
Offset: 0

Views

Author

Henry Bottomley, Nov 24 2000

Keywords

Comments

Changing the formula by replacing T(0,2n)=T(1,n) by T(0,2n)=T(m,n) for some other value of m, would make the generating function change to coefficient of x^n in expansion of (1+x)^k/(1-x^2)^m. This would produce A058394, A058395, A057884, (and effectively A007318).

Examples

			Rows are (1,0,1,0,1,0,1,...), (1,1,1,1,1,1,...), (1,2,2,2,2,2,...), (1,3,4,4,4,...) etc.
		

Crossrefs

Rows are A000035 (A000012 with zeros), A000012, A040000 etc. Columns are A000012, A001477, A000124, A000125, A000127, A006261, A008859, A008860, A008861, A008862, A008863 etc. Diagonals include A000079, A000225, A000295, A002662, A002663, A002664, A035038, A035039, A035040, A035041, etc. The triangles A008949, A054143 and A055248 also appear in the half of the array which is not powers of 2.

Formula

T(n, k)=T(n-1, k-1)+T(n, k-1) with T(0, k)=1, T(1, 1)=1, T(0, 2n)=T(1, n) and T(0, 2n+1)=0. Coefficient of x^n in expansion of (1+x)^k/(1-x^2).
Showing 1-10 of 13 results. Next