|
| |
|
|
A007318
|
|
Pascal's triangle read by rows: C(n,k) = binomial(n,k) = n!/(k!*(n-k)!), 0<=k<=n.
(Formerly M0082)
|
|
1336
|
|
|
|
1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1, 1, 6, 15, 20, 15, 6, 1, 1, 7, 21, 35, 35, 21, 7, 1, 1, 8, 28, 56, 70, 56, 28, 8, 1, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
0,5
|
|
|
COMMENTS
|
C(n,k) = number of k-element subsets of an n-element set.
Row n gives coefficients in expansion of (1+x)^n.
C(n+k-1,n-1) is the number of ways of placing k indistinguishable balls into n boxes (the "bars and stars" argument - see Feller).
C(n-1,m-1) is the number of compositions of n with m summands.
C(n,k) is the number of lattice paths from (0,0) to (n,k) using steps (1,0) and (1,1). [Joerg Arndt, Jul 01 2011]
If thought of as an infinite lower triangular matrix, inverse begins:
+1
-1 +1
+1 -2 +1
-1 +3 -3 +1
+1 -4 +6 -4 +1
The string of 2^n palindromic binomial coefficients starting after the A006516(n)-th entry are all odd. - Lekraj Beedassy, May 20 2003
C(n+k-1,n-1) is the number of standard tableaux of shape (n,1^k). - Emeric Deutsch, May 13 2004
Can be viewed as an array, read by antidiagonals, where the entries in the first row and column are all 1's and A(i,j) = A(i-1,j) + A(i,j-1) for all other entries. The determinants of all its n X n subarrays starting at (0,0) are all 1. - Gerald McGarvey, Aug 17 2004
Also the lower triangular readout of the exponential of a matrix whose entry {j+1,j} equals j+1 (and all other entries are zero). - Joseph Biberstine (jrbibers(AT)indiana.edu), May 26 2006
C(n-3,k-1) counts the permutations in S_n which have zero occurrences of the pattern 231 and one occurrence of the pattern 132 and k descents. C(n-3,k-1) also counts the permutations in S_n which have zero occurrences of the pattern 231 and one occurrence of the pattern 213 and k descents. - David Hoek (david.hok(AT)telia.com), Feb 28 2007
Inverse of A130595 (as an infinite lower triangular matrix). - Philippe DELEHAM, Aug 21 2007
Consider integer lists LL of lists L of the form LL=[m#L]=[m#[k#2]] (where '#' means 'times') like LL(m=3,k=3) = [[2,2,2],[2,2,2],[2,2,2]]. The number of the integer list partitions of LL(m,k) is equal to C(m+k,k) if multiple partitions like [[1,1],[2],[2]] and [[2],[2],[1,1]] and [[2],[1,1],[2]] are counted only once. For the example we find 4*5*6/3! = 20 = C(6,3). - Thomas Wieder, Oct 03 2007
The infinitesimal generator for the Pascal triangle and its inverse is A132440. - Tom Copeland, Nov 15 2007
Row n>=2 gives the number of k-digit (k>0) base n numbers with strictly decreasing digits; e.g. row 10 for A009995. Similarly, row n-1>=2 gives the number of k-digit (k>1) base n numbers with strictly increasing digits; see A009993 and compare A118629. - Rick L. Shepherd, Nov 25 2007
Comments from Lee Naish (lee(AT)cs.mu.oz.au), Mar 07 2008: (Start) C(n+k-1, k) is the number of ways a sequence of length k can be partitioned into n subsequences (see the Naish link).
C(n+k-1, k) is also the number of n- (or fewer) digit numbers written in radix at least k whose digits sum to k. For example, in decimal, there are C(3+3-1,3)=10 3-digit numbers whose digits sum to 3 (see A052217) and also C(4+2-1,2)=10 4-digit numbers whose digits sum to 2 (see A052216). This relationship can be used to generate the numbers of sequences A052216 to A052224 (and further sequences using radix greater than 10). (End)
Denote by sigma_k(x_1,x_2,...,x_n) the elementary symmetric polynomials. Then: C(2n+1,2k+1)=sigma_{n-k}(x_1,x_2,...,x_n), where x_i=tan^2(i*Pi/(2n+1)),(i=1,2,...,n). C(2n,2k+1)=2n*sigma_{n-1-k}(x_1,x_2,...,x_{n-1}), where x_i=tan^2(i*Pi/(2n)), (i=1,2,...,n-1). C(2n,2k)=sigma_{n-k}(x_1,x_2,...,x_n), where x_i=tan^2((2i-1)Pi/(4n)), (i=1,2,...,n). C(2n+1,2k)=(2n+1)sigma_{n-k}(x_1,x_2,...,x_n), where x_i=tan^2((2i-1)Pi/(4n+2)), (i=1,2,...,n). - Milan Janjic, May 07 2008
Given matrices R and S with R(n,k) = C(n,k)*r(n-k) and S(n,k) = C(n,k)*s(n-k), then R*S = T where T(n,k) = C(n,k)*[r(.)+s(.)]^(n-k), umbrally. And, the e.g.f.s for the row polynomials of R, S and T are, respectively, exp(x*t)*exp[r(.)*x], exp(x*t)*exp[s(.)*x] and exp(x*t)*exp[r(.)*x]*exp[s(.)*x] = exp{[t+r(.)+s(.)]*x}. The row polynomials are essentially Appell polynomials. See A132382 for an example. [From Tom Copeland, Aug 21 2008]
As the rectangle R(m,n)=C(m+n-2,m-1), the weight array W (defined generally at A114112) of R is essentially R itself, in the sense that if row 1 and column 1 of W=A144225 are deleted, the remaining array is R. [From Clark Kimberling, Sep 15 2008]
If A007318 = M as infinite lower triangular matrix, M^n gives A130595, A023531, A007318, A038207, A027465, A038231, A038243, A038255, A027466, A038279, A038291, A038303, A038315, A038327, A133371, A147716, A027467 for n=-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 respectively. [From Philippe DELEHAM, Nov 11 2008]
The coefficients of the polynomials with e.g.f. exp(x*t)*(cosh(t)+sinh(t)). [From Peter Luschny, Jul 09 2009]
The triangle or chess sums, see A180662 for their definitions, link Pascal's triangle with twenty different sequences, see the crossrefs. All sums come in pairs due to the symmetrical nature of this triangle. The knight sums Kn14 - Kn110 have been added. It is remarkable that all knight sums are related to the Fibonacci numbers, i.e. A000045, but none of the others. [From Johannes W. Meijer, Sep 22 2010]
C(n,k) is also the number of ways to distribute n+1 balls into k+1 urns so that each urn gets at least one ball. See example in the example section below.
C(n,k) is the number of increasing functions from {1,...,k} to {1,...,n} since there are C(n,k) ways to choose the k distinct, ordered elements of the range from the codomain {1,...,n}. See example in the example section below. [From Dennis Walsh, Apr 07 2011]
Central binomial coefficients: T(2*n,n)=A000984(n), T(n,[n/2])=A001405(n). [Reinhard Zumkeller, Nov 09 2011]
C(n,k) is the number of subsets of {1,...,n+1} with k+1 as median element. To see this, note that sum(C(k,j)*C(n-k,j),j=0..min(k,n-k))=C(n,k). See example in example section below. [From Dennis Walsh, Dec 15 2011]
This is the coordinator triangle for the lattice Z^n, see Conway-Sloane, 1997 [N. J. A. Sloane, Jan 17, 2012]
One of three infinite families of integral factorial ratio sequences of height 1 (see Bober, Theorem 1.2). The other two are A046521 and A068555. For real r >= 0, C_r(n,k) := floor(r*n)!/(floor(r*k)!*floor(r*(n-k))!) is integral. See A211226 for the case r = 1/2. - Peter Bala, Apr 10 2012
For n > 0: T(n,k) = A029600(n,k) - A029635(n,k), 0 <= k <= n. [Reinhard Zumkeller, Apr 16 2012]
Define a finite triangle T(m,k) with n rows such that T(m,0)=1 is the left column, T(m,m) = binomial(n-1,m) is the right column, and the other entries are T(m,k)=T(m-1,k-1)+T(m-1,k) as in Pascal's triangle. The sum of all entries in T (there are A000217(n) elements) is 3^(n-1). - J. M. Bergot, Oct 01 2012
The lower triangular Pascal matrix serves as a representation of the operator exp(RLR) in a basis comprised of a sequence of polynomials p_n(x) characterized by ladder operators defined by R p_n(x) = p_(n+1)(x) and L p_n(x) = n p_(n-1)(x). See A132440, A218272, A218234, A097805, and A038207. The transposed and padded Pascal matrices can be associated to the special linear group SL2. - Tom Copeland, Oct 25 2012
See A193242. Alexander R. Povolotsky, Feb 05 2013
A permutation p_1...p_n of the set {1,...,n} has a descent at position i if p_i > p_(i+1). Let S(n) denote the subset of permutations p_1...p_n of {1,...,n} such that p_(i+1) - p_i <= 1 for i = 1,...,n-1. Then binomial(n,k) counts the number of permutations in S(n+1) with k descents. Alternatively, binomial(n,k) counts the number of permutations in S(n+1) with k+1 increasing runs. - Peter Bala, Mar 24 2013
|
|
|
REFERENCES
|
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.
Mohammad K. Azarian, Fibonacci Identities as Binomial Sums, International Journal of Contemporary Mathematical Sciences, Vol. 7, No. 38, 2012, pp. 1871-1876.
Mohammad K. Azarian, Fibonacci Identities as Binomial Sums II, International Journal of Contemporary Mathematical Sciences, Vol. 7, No. 42, 2012, pp. 2053-2059.
Paul Barry, On Integer-Sequence-Based Constructions of Generalized Pascal Triangles, Journal of Integer Sequences, Vol. 9 (2006), Article 06.2.4.
P. Barry, Riordan-Bernstein Polynomials, Hankel Transforms and Somos Sequences, Journal of Integer Sequences, Vol. 15 2012, #12.8.2. - From N. J. A. Sloane, Dec 29 2012
P. Barry and A. Hennessy, Four-term Recurrences, Orthogonal Polynomials and Riordan Arrays, Journal of Integer Sequences, 2012, article 12.4.2. - From N. J. A. Sloane, Sep 21 2012
A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 63ff.
B. A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8. English translation published by Fibonacci Association, Santa Clara Univ., Santa Clara, CA, 1993; see p. 4.
Naiomi T. Cameron and Asamoah Nkwanta, On Some (Pseudo) Involutions in the Riordan Group, Journal of Integer Sequences, Vol. 8 (2005), Article 05.3.7.
C. Cobeli and A. Zaharescu, Promenade around Pascal Triangle-Number Motives, Bull. Math. Soc. Sci. Math. Roumanie, Tome 56(104) No. 1, 2013, 73-98; http://rms.unibuc.ro/bulletin/pdf/56-1/PromenadePascalPart1.pdf. - From N. J. A. Sloane, Feb 16 2013
L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 306.
P. Curtz, Integration numerique des systemes differentiels..,C.C.S.A.,Arcueil,1969. [From Paul Curtz, Mar 06 2009]
W. Feller, An Introduction to Probability Theory and Its Application, Vol. 1, 2nd ed. New York: Wiley, p. 36, 1968.
D. Fowler, The binomial coefficient function, Amer. Math. Monthly, 103 (1996), 1-17.
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd. ed., 1994, p. 155.
He, Tian-Xiao, and Sprugnoli, Renzo; Sequence characterization of Riordan arrays. Discrete Math. 309 (2009), no. 12, 3962-3974.
D. Hoek, Parvisa moenster i permutationer [Swedish], 2007.
D. E. Knuth, The Art of Computer Programming, Vol. 1, 2nd ed., p. 52.
S. K. Lando, Lecture on Generating Functions, Amer. Math. Soc., Providence, R.I., 2003, pp. 60-61.
D. Merlini, F. Uncini and M. C. Verri, A unified approach to the study of general and palindromic compositions, Integers 4 (2004), A23, 26 pp.
Y. Moshe, The density of 0's in recurrence double sequences, J. Number Theory, 103 (2003), 109-121.
Asamoah Nkwanta and Earl R. Barnes, Two Catalan-type Riordan Arrays and their Connections to the Chebyshev Polynomials of the First Kind, Journal of Integer Sequences, Article 12.3.3, 2012. - From N. J. A. Sloane, Sep 16 2012
Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 71.
J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 6.
J. Riordan, Combinatorial Identities, Wiley, 1968, p. 2.
R. Sedgewick and P. Flajolet, An Introduction to the Analysis of Algorithms, Addison-Wesley, Reading, MA, 1996, p. 143.
L. W. Shapiro, S. Getu, W.-J. Woan and L. C. Woodson, The Riordan group, Discrete Applied Math., 34 (1991), 229-239.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
D. Wells, The Penguin Dictionary of Curious and Interesting Numbers, pp. 115-8, Penguin Books 1987.
|
|
|
LINKS
|
N. J. A. Sloane, First 141 rows of Pascal's triangle, formatted as a simple linear sequence n, a(n)
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
V. Asundi, Generate a Yanghui Triangle
P. Bala, A combinatorial interpretation for the binomial coefficients
C. Banderier and D. Merlini, Lattice paths with an infinite set of jumps
Paul Barry, Eulerian polynomials as moments, via exponential Riordan arrays, arXiv:1105.3043, 2011
Paul Barry, Combinatorial polynomials as moments, Hankel transforms and exponential Riordan arrays, arXiv:1105.3044, 2011
J. W. Bober, Factorial ratios, hypergeometric series, and a family of step functions, arXiv:0709.1977v1 [math.NT], J. London Math. Soc. (2) 79 (2009), 422-444.
D. Butler, Pascal's Triangle
J. H. Conway and N. J. A. Sloane, Low-dimensional lattices. VII Coordination sequences, Proc. R. Soc. Lond. A (1997) 453, 2369-2389.
T. Copeland, Infinitesimal Generators, the Pascal Pyramid, and the Witt and Virasoro Algebras
Doslic, Tomislav and Veljan, Darko. Logarithmic behavior of some combinatorial sequences. Discrete Math. 308 (2008), no. 11, 2182--2212. MR2404544 (2009j:05019) - From N. J. A. Sloane, May 01 2012
L. Euler, On the expansion of the power of any polynomial (1+x+x^2+x^3+x^4+etc.)^n
L. Euler, De evolutione potestatis polynomialis cuiuscunque (1+x+x^2+x^3+x^4+etc.)^n E709
A. Farina, et al.,Tartaglia-Pascal's triangle: a historical perspective with applications(subscription required).
S. R. Finch, P. Sebah and Z.-Q. Bai, Odd Entries in Pascal's Trinomial Triangle (arXiv:0802.2654)
Nick Hobson, Python program
Matthew Hubbard and Tom Roby, Pascal's Triangle From Top to Bottom [Broken link?]
S. Kak, The Golden Mean and the Physics of Aesthetics
W. Knight, Short Table of Binomial Coefficients
W. Lang, On generalizations of Stirling number triangles, J. Integer Seqs., Vol. 3 (2000), #00.2.4.
Mathforum, Pascal's Triangle
Mathforum, Links for Pascal's triangle
C. McDermottroe, n-th row generator of Pascal's triangle
D. Merlini, R. Sprugnoli and M. C. Verri, An algebra for proper generating trees
Lee Naish Pascal's Triangle and debugging software
A. Necer, Series formelles et produit de Hadamard
G. Sivek et al., ThinkQuest, Pascal's Triangle Row Generator
N. J. A. Sloane, My favorite integer sequences, in Sequences and their Applications (Proceedings of SETA '98).
N. J. A. Sloane, Triangle showing silhouette of first 30 rows of Pascal's triangle (after Cobeli and Zaharescu)
H. Verrill, Pascal's Triangle and related triangles
G. Villemin's Almanach of Numbers, Triangle de Pascal
Eric Weisstein's World of Mathematics, Pascals Triangle
Wikipedia, Pascal's triangle
H. S. Wilf, Generatingfunctionology, 2nd edn., Academic Press, NY, 1994, pp. 12ff.
K. Williams, Mathforum, Interactive Pascal's Triangle
K. Williams, MathForum, Pascal's Triangle to Row 19
D. Zeilberger, The Combinatorial Astrology of Rabbi Abraham Ibn Ezra [math/9809136]
Index entries for triangles and arrays related to Pascal's triangle
|
|
|
FORMULA
|
a(n, k) = C(n,k) = binomial(n, k).
C(n, k) = C(n-1, k) + C(n-1, k-1).
a(n+1, m) = a(n, m)+a(n, m-1), a(n, -1) := 0, a(n, m) := 0, n<m; a(0, 0)=1.
C(n, k)=n!/(k!(n-k)!) if 0<=k<=n, otherwise 0.
G.f.: 1/(1-y-x*y)=Sum(C(n, k)*x^k*y^n, n, k>=0)
G.f.: 1/(1-x-y)=Sum(C(n+k, k)*x^k*y^n, n, k>=0).
G.f. for row n: (1+x)^n = sum(k=0..n, C(n, k)x^k).
G.f. for column n: x^n/(1-x)^n.
E.g.f.: A(x, y)=exp(x+x*y).
E.g.f. for column n: x^n*exp(x)/n!.
In general the m-th power of A007318 is given by: T(0, 0) = 1, T(n, k) = T(n-1, k-1) + m*T(n-1, k), where n is the row-index and k is the column; also T(n, k) = m^(n-k) C(n, k).
Triangle T(n, k) read by rows; given by A000007 DELTA A000007, where DELTA is Deleham's operator defined in A084938.
With P(n+1) = the number of integer partitions of (n+1), p(i) = the number of parts of the i-th partition of (n+1), d(i) = the number of different parts of the i-th partition of (n+1), m(i, j) = multiplicity of the j-th part of the i-th partition of (n+1), sum_[p(i)=k]_{i=1}^{P(n+1)} = sum running from i=1 to i=P(n+1) but taking only partitions with p(i)=(k+1) parts into account, prod_{j=1}^{d(i)} = product running from j=1 to j=d(i) one has B(n, k) = sum_[p(i)=(k+1)]_{i=1}^{P(n+1)} 1/prod_{j=1}^{d(i)} m(i, j)! E.g. B(5, 3) = 10 because n=6 has the following partitions with m=3 parts: (114), (123), (222). For their multiplicities one has: (114): 3!/(2!*1!) = 3, (123): 3!/(1!*1!*1!) = 6, (222): 3!/3! = 1. The sum is 3+6+1=10=B(5, 3). - Thomas Wieder, Jun 03 2005
C(n, k) = Sum_{j, 0<=j<=k} = (-1)^j*C(n+1+j, k-j)*A000108(j) . - Philippe DELEHAM, Oct 10 2005
G.f.: 1 + x(1 + x) + x^3(1 + x)^2 + x^6(1 + x)^3 + ... . - Michael Somos Sep 16 2006
Sum_{k, 0<=k<=[n/2]} x^(n-k)*T(n-k,k)= A000007(n), A000045(n+1), A002605(n), A030195(n+1), A057087(n), A057088(n), A057089(n), A057090(n), A057091(n), A057092(n), A057093(n) for x= 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 respectively . Sum_{k, 0<=k<=[n/2]} (-1)^k*x^(n-k)*T(n-k,k)= A000007(n), A010892(n), A009545(n+1), A057083(n), A001787(n+1), A030191(n), A030192(n), A030240(n), A057084(n), A057085(n+1), A057086(n), A084329(n+1) for x= 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20 respectively . - Philippe DELEHAM, Sep 16 2006
C(n,k) <= A062758(n) for n > 1. - Reinhard Zumkeller, Mar 04 2008
C(t+p-1, t) = Sum(i=0..t, C(i+p-2, i)) = Sum(i=1..p, C(i+t-2, t-1)) A binomial number is the sum of its left parent and all its right ancestors, which equals the sum of its right parent and all its left ancestors. - Lee Naish (lee(AT)cs.mu.oz.au), Mar 07 2008
Contribution from Paul D. Hanna, Mar 24 2011: (Start)
Let A(x) = Sum_{n>=0} x^(n(n+1)/2)*(1+x)^n be the g.f. of the flattened triangle:
A(x) = 1 + (x + x^2) + (x^3 + 2*x^4 + x^5) + (x^6 + 3*x^7 + 3*x^8 + x^9) +...
then A(x) equals the series Sum_{n>=0} (1+x)^n*x^n*Product_{k=1..n} (1-(1+x)*x^(2k-1))/(1-(1+x)*x^(2k));
also, A(x) equals the continued fraction 1/(1- x*(1+x)/(1+ x*(1-x)*(1+x)/(1- x^3*(1+x)/(1+ x^2*(1-x^2)*(1+x)/(1- x^5*(1+x)/(1+ x^3*(1-x^3)*(1+x)/(1- x^7*(1+x)/(1+ x^4*(1-x^4)*(1+x)/(1- ...))))))))).
These formulae are due to (1) a q-series identity and (2) a partial elliptic theta function expression. (End)
Row n of the triangle is the result of applying the ConvOffs transform to the first n terms of the natural numbers (1, 2, 3, ...,n). See A001263 or A214281 for a definition of this transformation. - Gary W. Adamson, Jul 12 2012
Contribution from L. Edson Jeffery, Aug 02 2012: (Start)
Row n (n >= 0) of the triangle is given by the n-th antidiagonal of the infinite matrix P^n, where P = (p_{i,j}), i,j >= 0, is the production matrix
0, 1,
1, 0, 1,
0, 1, 0, 1,
0, 0, 1, 0, 1,
0, 0, 0, 1, 0, 1,
0, 0, 0, 0, 1, 0, 1,
0, 0, 0, 0, 0, 1, 0, 1,
0, 0, 0, 0, 0, 0, 1, 0, 1,
... (End)
|
|
|
EXAMPLE
|
Triangle T(n,k) begins:
n\k 0 1 2 3 4 5 6 7 8 9 10 11...
0 1
1 1 1
2 1 2 1
3 1 3 3 1
4 1 4 6 4 1
5 1 5 10 10 5 1
6 1 6 15 20 15 6 1
7 1 7 21 35 35 21 7 1
8 1 8 28 56 70 56 28 8 1
9 1 9 36 84 126 126 84 36 9 1
10 1 10 45 120 210 252 210 120 45 10 1
11 1 11 55 165 330 462 462 330 165 55 11 1
...
For example, there are C(4,2)=6 ways to distribute 5 balls BBBBB, among 3 different urns, < > ( ) [ ], so that each urn gets at least one ball, namely, <BBB>(B)[B], <B>(BBB)[B], <B>(B)[BBB], <BB>(BB)[B], <BB>(B)[BB], and <B>(BB)[BB].
For example, there are C(4,2)=6 increasing functions from {1,2} to {1,2,3,4}, namely, {(1,1),(2,2)},{(1,1),(2,3)}, {(1,1),(2,4)}, {(1,2),(2,3)}, {(1,2),(2,4)}, and {(1,3),(2,4)}. [From Dennis Walsh, Apr 07 2011]
For example, there are C(4,2)=6 subsets of {1,2,3,4,5} with median element 3, namely, {3}, {1,3,4}, {1,3,5}, {2,3,4}, {2,3,5}, and {1,2,3,4,5}. [From Dennis Walsh, Dec 15 2011]
|
|
|
MAPLE
|
A007318 := (n, k)->binomial(n, k);
with(combstruct):for n from 0 to 11 do seq(count(Combination(n), size=m), m = 0 .. n) od; - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Dec 16 2007
|
|
|
MATHEMATICA
|
Flatten[Table[Binomial[n, k], {n, 0, 11}, {k, 0, n}]] (from Robert G. Wilson v, Jan 19 2004)
|
|
|
PROG
|
(AXIOM) -- (start)
)set expose add constructor OutputForm
pascal(0, n) == 1
pascal(n, n) == 1
pascal(i, j | 0 < i and i < j) == pascal(i-1, j-1) + pascal(i, j-1)
pascalRow(n) == [pascal(i, n) for i in 0..n]
displayRow(n) == output center blankSeparate pascalRow(n)
for i in 0..20 repeat displayRow i -- (end)
(PARI) C(n, k)=if(k<0|k>n, 0, n!/k!/(n-k)!)
(PARI) C(n, k)=if(n<0, 0, polcoeff((1+x)^n, k))
(PARI) C(n, k)=if(k<0|k>n, 0, if(k==0&&n==0, 1, C(n-1, k)+C(n-1, k-1)))
(PARI) C(n, k)=binomial(n, k) \\ Charles R Greathouse IV, Jun 08 2011
(Python) See Hobson link.
(Haskell)
a007318 n k = a007318_tabl !! n !! k
a007318_row n = a007318_tabl !! n
a007318_list = concat a007318_tabl
a007318_tabl = iterate (\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [1]
-- Cf. http://www.haskell.org/haskellwiki/Blow_your_mind#Mathematical_sequences
-- Reinhard Zumkeller, Nov 09 2011, Oct 22 2010
(Maxima) create_list(binomial(n, k), n, 0, 12, k, 0, n); /* Emanuele Munarini, Mar 11 2011 */
(PARI) /* From a g.f. of the flattened triangle (Paul Hanna): */
{a(n)=polcoeff(sum(m=0, n, (x+x^2)^m*prod(k=1, m, (1-(1+x)*x^(2*k-1))/(1-(1+x+x*O(x^n))*x^(2*k)))), n)}
|
|
|
CROSSREFS
|
Equals differences between consecutive terms of A102363. - David G. Williams (davidwilliams(AT)Paxway.com), Jan 23 2006
Row sums give A000079 (powers of 2).
Cf. A083093 (triangle read mod 3), A214292 (first differences of rows).
Partial sums of rows give triangle A008949.
Infinite matrix squared: A038207, cubed: A027465
Cf. A101164. If rows are sorted we get A061554 or A107430.
Another version: A108044.
Cf. A008277, A132311, A132312, A052216, A052217, A052218, A052219, A052220, A052221, A052222, A052223, A144225, A202750, A211226, A047999, A026729, A052553, A051920, A193242.
Contribution from Johannes W. Meijer, Sep 22 2010: (Start)
Triangle sums (see the comments): A000079 (Row1); A000007 (Row2); A000045 (Kn11 & Kn21); A000071 (Kn12 & Kn22); A001924 (Kn13 & Kn23); A014162 (Kn14 & Kn24); A014166 (Kn15 & Kn25); A053739 (Kn16 & Kn26); A053295 (Kn17 & Kn27); A053296 (Kn18 & Kn28); A053308 (Kn19 & Kn29); A053309 (Kn110 & Kn210); A001519 (Kn3 & Kn4); A011782 (Fi1 & Fi2); A000930 (Ca1 & Ca2); A052544 (Ca3 & Ca4); A003269 (Gi1 & Gi2); A055988 (Gi3 & Gi4); A034943 (Ze1 & Ze2); A005251 (Ze3 & Ze4).
(End)
Sequence in context: A118433 * A108086 A130595 A108363 A076831 A197061
Adjacent sequences: A007315 A007316 A007317 * A007319 A007320 A007321
|
|
|
KEYWORD
|
nonn,tabl,nice,easy,core,changed
|
|
|
AUTHOR
|
N. J. A. Sloane, Mira Bernstein (mira(AT)math.berkeley.edu)
|
|
|
STATUS
|
approved
|
| |
|
|