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

A000012 The simplest sequence of positive numbers: the all 1's sequence.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, May 16 1994

Keywords

Comments

Number of ways of writing n as a product of primes.
Number of ways of writing n as a sum of distinct powers of 2.
Continued fraction for golden ratio A001622.
Partial sums of A000007 (characteristic function of 0). - Jeremy Gardiner, Sep 08 2002
An example of an infinite sequence of positive integers whose distinct pairwise concatenations are all primes! - Don Reble, Apr 17 2005
Binomial transform of A000007; inverse binomial transform of A000079. - Philippe Deléham, Jul 07 2005
A063524(a(n)) = 1. - Reinhard Zumkeller, Oct 11 2008
For n >= 0, let M(n) be the matrix with first row = (n n+1) and 2nd row = (n+1 n+2). Then a(n) = absolute value of det(M(n)). - K.V.Iyer, Apr 11 2009
The partial sums give the natural numbers (A000027). - Daniel Forgues, May 08 2009
From Enrique Pérez Herrero, Sep 04 2009: (Start)
a(n) is also tau_1(n) where tau_2(n) is A000005.
a(n) is a completely multiplicative arithmetical function.
a(n) is both squarefree and a perfect square. See A005117 and A000290. (End)
Also smallest divisor of n. - Juri-Stepan Gerasimov, Sep 07 2009
Also decimal expansion of 1/9. - Enrique Pérez Herrero, Sep 18 2009; corrected by Klaus Brockhaus, Apr 02 2010
a(n) is also the number of complete graphs on n nodes. - Pablo Chavez (pchavez(AT)cmu.edu), Sep 15 2009
Totally multiplicative sequence with a(p) = 1 for prime p. Totally multiplicative sequence with a(p) = a(p-1) for prime p. - Jaroslav Krizek, Oct 18 2009
n-th prime minus phi(prime(n)); number of divisors of n-th prime minus number of perfect partitions of n-th prime; the number of perfect partitions of n-th prime number; the number of perfect partitions of n-th noncomposite number. - Juri-Stepan Gerasimov, Oct 26 2009
For all n>0, the sequence of limit values for a(n) = n!*Sum_{k>=n} k/(k+1)!. Also, a(n) = n^0. - Harlan J. Brothers, Nov 01 2009
a(n) is also the number of 0-regular graphs on n vertices. - Jason Kimberley, Nov 07 2009
Differences between consecutive n. - Juri-Stepan Gerasimov, Dec 05 2009
From Matthew Vandermast, Oct 31 2010: (Start)
1) When sequence is read as a regular triangular array, T(n,k) is the coefficient of the k-th power in the expansion of (x^(n+1)-1)/(x-1).
2) Sequence can also be read as a uninomial array with rows of length 1, analogous to arrays of binomial, trinomial, etc., coefficients. In a q-nomial array, T(n,k) is the coefficient of the k-th power in the expansion of ((x^q -1)/(x-1))^n, and row n has a sum of q^n and a length of (q-1)*n + 1. (End)
The number of maximal self-avoiding walks from the NW to SW corners of a 2 X n grid.
When considered as a rectangular array, A000012 is a member of the chain of accumulation arrays that includes the multiplication table A003991 of the positive integers. The chain is ... < A185906 < A000007 < A000012 < A003991 < A098358 < A185904 < A185905 < ... (See A144112 for the definition of accumulation array.) - Clark Kimberling, Feb 06 2011
a(n) = A007310(n+1) (Modd 3) := A193680(A007310(n+1)), n>=0. For general Modd n (not to be confused with mod n) see a comment on A203571. The nonnegative members of the three residue classes Modd 3, called [0], [1], and [2], are shown in the array A088520, if there the third row is taken as class [0] after inclusion of 0. - Wolfdieter Lang, Feb 09 2012
Let M = Pascal's triangle without 1's (A014410) and V = a variant of the Bernoulli numbers A027641 but starting [1/2, 1/6, 0, -1/30, ...]. Then M*V = [1, 1, 1, 1, ...]. - Gary W. Adamson, Mar 05 2012
As a lower triangular array, T is an example of the fundamental generalized factorial matrices of A133314. Multiplying each n-th diagonal by t^n gives M(t) = I/(I-t*S) = I + t*S + (t*S)^2 + ... where S is the shift operator A129184, and T = M(1). The inverse of M(t) is obtained by multiplying the first subdiagonal of T by -t and the other subdiagonals by zero, so A167374 is the inverse of T. Multiplying by t^n/n! gives exp(t*S) with inverse exp(-t*S). - Tom Copeland, Nov 10 2012
The original definition of the meter was one ten-millionth of the distance from the Earth's equator to the North Pole. According to that historical definition, the length of one degree of latitude, that is, 60 nautical miles, would be exactly 111111.111... meters. - Jean-François Alcover, Jun 02 2013
Deficiency of 2^n. - Omar E. Pol, Jan 30 2014
Consider n >= 1 nonintersecting spheres each with surface area S. Define point p on sphere S_i to be a "public point" if and only if there exists a point q on sphere S_j, j != i, such that line segment pq INTERSECT S_i = {p} and pq INTERSECT S_j = {q}; otherwise, p is a "private point". The total surface area composed of exactly all private points on all n spheres is a(n)*S = S. ("The Private Planets Problem" in Zeitz.) - Rick L. Shepherd, May 29 2014
For n>0, digital roots of centered 9-gonal numbers (A060544). - Colin Barker, Jan 30 2015
Product of nonzero digits in base-2 representation of n. - Franklin T. Adams-Watters, May 16 2016
Alternating row sums of triangle A104684. - Wolfdieter Lang, Sep 11 2016
A fixed point of the run length transform. - Chai Wah Wu, Oct 21 2016
Length of period of continued fraction for sqrt(A002522) or sqrt(A002496). - A.H.M. Smeets, Oct 10 2017
a(n) is also the determinant of the (n+1) X (n+1) matrix M defined by M(i,j) = binomial(i,j) for 0 <= i,j <= n, since M is a lower triangular matrix with main diagonal all 1's. - Jianing Song, Jul 17 2018
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = min(i,j) for 1 <= i,j <= n (see Xavier Merlin reference). - Bernard Schott, Dec 05 2018
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = tau(gcd(i,j)) for 1 <= i,j <= n (see De Koninck & Mercier reference). - Bernard Schott, Dec 08 2020

Examples

			1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + ...)))) = A001622.
1/9 = 0.11111111111111...
From _Wolfdieter Lang_, Feb 09 2012: (Start)
Modd 7 for nonnegative odd numbers not divisible by 3:
A007310: 1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, ...
Modd 3:  1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
(End)
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 692 pp. 90 and 297, Ellipses, Paris, 2004.
  • Xavier Merlin, Méthodix Algèbre, Exercice 1-a), page 153, Ellipses, Paris, 1995.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 277, 284.
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
  • Paul Zeitz, The Art and Craft of Mathematical Problem Solving, The Great Courses, The Teaching Company, 2010 (DVDs and Course Guidebook, Lecture 6: "Pictures, Recasting, and Points of View", pp. 32-34).

Crossrefs

Programs

  • Haskell
    a000012 = const 1
    a000012_list = repeat 1 -- Reinhard Zumkeller, May 07 2012
    
  • Magma
    [1 : n in [0..100]];
    
  • Maple
    seq(1, i=0..150);
  • Mathematica
    Array[1 &, 50] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *)
  • Maxima
    makelist(1, n, 1, 30); /* Martin Ettl, Nov 07 2012 */
    
  • PARI
    {a(n) = 1};
    
  • Python
    print([1 for n in range(90)]) # Michael S. Branicky, Apr 04 2022

Formula

a(n) = 1.
G.f.: 1/(1-x).
E.g.f.: exp(x).
G.f.: Product_{k>=0} (1 + x^(2^k)). - Zak Seidov, Apr 06 2007
Completely multiplicative with a(p^e) = 1.
Regarded as a square array by antidiagonals, g.f. 1/((1-x)(1-y)), e.g.f. Sum T(n,m) x^n/n! y^m/m! = e^{x+y}, e.g.f. Sum T(n,m) x^n y^m/m! = e^y/(1-x). Regarded as a triangular array, g.f. 1/((1-x)(1-xy)), e.g.f. Sum T(n,m) x^n y^m/m! = e^{xy}/(1-x). - Franklin T. Adams-Watters, Feb 06 2006
Dirichlet g.f.: zeta(s). - Ilya Gutkovskiy, Aug 31 2016
a(n) = Sum_{l=1..n} (-1)^(l+1)*2*cos(Pi*l/(2*n+1)) = 1 identically in n >= 1 (for n=0 one has 0 from the undefined sum). From the Jolley reference, (429) p. 80. Interpretation: consider the n segments between x=0 and the n positive zeros of the Chebyshev polynomials S(2*n, x) (see A049310). Then the sum of the lengths of every other segment starting with the one ending in the largest zero (going from the right to the left) is 1. - Wolfdieter Lang, Sep 01 2016
As a lower triangular matrix, T = M*T^(-1)*M = M*A167374*M, where M(n,k) = (-1)^n A130595(n,k). Note that M = M^(-1). Cf. A118800 and A097805. - Tom Copeland, Nov 15 2016

A079262 Octanacci numbers: a(0)=a(1)=...=a(6)=0, a(7)=1; for n >= 8, a(n) = Sum_{i=1..8} a(n-i).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 4, 8, 16, 32, 64, 128, 255, 509, 1016, 2028, 4048, 8080, 16128, 32192, 64256, 128257, 256005, 510994, 1019960, 2035872, 4063664, 8111200, 16190208, 32316160, 64504063, 128752121, 256993248, 512966536, 1023897200, 2043730736
Offset: 0

Views

Author

Michael Joseph Halm, Feb 04 2003

Keywords

Comments

a(n+7) is the number of compositions of n into parts <= 8. - Joerg Arndt, Sep 24 2020

Examples

			a(16) = 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255.
		

Crossrefs

Row 8 of arrays A048887 and A092921 (k-generalized Fibonacci numbers).
Cf. A253706, A253705. Primes and indices of primes in this sequence.

Programs

  • Maple
    for j from 0 to 6 do a[j]:=0 od: a[7]:=1: for n from 8 to 45 do a[n]:=sum(a[n-i],i=1..8) od:seq(a[n],n=0..45); # Emeric Deutsch, Apr 16 2005
  • Mathematica
    LinearRecurrence[{1, 1, 1, 1, 1, 1, 1, 1}, {0, 0, 0, 0, 0, 0, 0, 1}, 50] (* Vladimir Joseph Stephan Orlovsky, May 25 2011 *)
    With[{nn=8},LinearRecurrence[Table[1,{nn}],Join[Table[0,{nn-1}],{1}],50]] (* Harvey P. Dale, Aug 17 2013 *)

Formula

G.f.: x^7/(1 - x - x^2 - x^3 - x^4 - x^5 - x^6 - x^7 - x^8). - Emeric Deutsch, Apr 16 2005
a(1)..a(9) = 1, 1, 2, 4, 8, 16, 32, 64, 128. a(10) and following are given by 63*2^(n-8)+(1/2+sqrt(5/4))^(n-6)/sqrt(5)-(1/2-sqrt(5/4))^(n-6)/sqrt(5). Offset 10. a(10)=255. - Al Hakanson (hawkuu(AT)gmail.com), Feb 14 2009
Another form of the g.f.: f(z) = (z^7 - z^8)/(1 - 2*z + z^9), then a(n) = Sum_{i=0..floor((n-7)/9)} (-1)^i*binomial(n-7-8*i,i)*2^(n-7-9*i) - Sum_{i=0..floor((n-8)/9)} (-1)^i*binomial(n-8-8*i,i)*2^(n-8-9*i) with Sum_{i=m..n} alpha(i) = 0 for m>n. - Richard Choulet, Feb 22 2010
Sum_{k=0..7*n} a(k+b)*A171890(n,k) = a(8*n+b), b>=0.
a(n) = 2*a(n-1) - a(n-9). - Vincenzo Librandi, Dec 20 2010

Extensions

Corrected by Joao B. Oliveira (oliveira(AT)inf.pucrs.br), Nov 25 2004

A035343 Triangle of coefficients in expansion of (1 + x + x^2 + x^3 + x^4)^n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 18, 19, 18, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 52, 68, 80, 85, 80, 68, 52, 35, 20, 10, 4, 1, 1, 5, 15, 35, 70, 121, 185, 255, 320, 365, 381, 365, 320, 255, 185, 121, 70, 35, 15, 5, 1, 1, 6, 21, 56, 126, 246, 426, 666
Offset: 0

Views

Author

Keywords

Comments

Coefficient of x^k in (1 + x + x^2 + x^3 + x^4)^n is the number of distinct ways in which k unlabeled objects can be distributed in n labeled urns allowing at most 4 objects to fall in each urn. - N-E. Fahssi, Mar 16 2008
The n-th row has 4n+1 terms (A016813). - Michel Marcus, Sep 08 2013
Number of lattice paths from (0,0) to (n,k) using steps (1,0), (1,1), (1,2), (1,3), (1,4). - Nicholas Ham, Sep 14 2018
T(n,k) is the number of ways to obtain a sum of n+k when throwing a 5-sided die n times. - Feryal Alayont, Dec 30 2024

Examples

			Triangle begins:
n\k [0]  [1]  [2]  [3]  [4]  [5]  [6]  [7]  [8]  [9]  [10] [11] [12]
[0] 1;
[1] 1,   1,   1,   1,   1;
[2] 1,   2,   3,   4,   5,   4,   3,   2,   1;
[3] 1,   3,   6,   10,  15,  18,  19,  18,  15,  10,  6,   3,   1;
[4] ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 77-78, 16. for q=5.
  • D. C. Fielder and C. O. Alford, Pascal's triangle: top gun or just one of the gang?, in G E Bergum et al., eds., Applications of Fibonacci Numbers Vol. 4 1991 pp. 77-90 (Kluwer).

Crossrefs

Programs

  • Maple
    #Define the r-nomial coefficients for r = 1, 2, 3, ...
    rnomial := (r,n,k) -> add((-1)^i*binomial(n,i)*binomial(n+k-1-r*i,n-1), i = 0..floor(k/r)):
    #Display the 5-nomials as a table
    r := 5:  rows := 10:
    for n from 0 to rows do
    seq(rnomial(r,n,k), k = 0..(r-1)*n)
    end do;
    # Peter Bala, Sep 07 2013
  • Mathematica
    Flatten[Table[CoefficientList[(1 + x + x^2 + x^3 + x^4)^n, x], {n, 0, 10}]] (* T. D. Noe, Apr 04 2011 *)
  • Maxima
    pentanomial(n,k):=coeff(expand((1+x+x^2+x^3+x^4)^n),x,k);
    create_list(pentanomial(n,k),n,0,6,k,0,4*n); /* Emanuele Munarini, Mar 15 2011 */
    
  • PARI
    row(n) = Vec(((1 + x + x^2 + x^3 + x^4)^n) + O(x^(4*n+1)))
    trianglerows(n) = for(k=0, n-1, print(row(k)))
    /* Print initial 5 rows of triangle as follows */
    trianglerows(5) \\ Felix Fröhlich, Aug 26 2018

Formula

T(n,k) = Sum_{i = 0..floor(k/5)} (-1)^i*binomial(n,i)*binomial(n+k-1-5*i,n-1) for n >= 0 and 0 <= k <= 4*n. - Peter Bala, Sep 07 2013

A063260 Sextinomial (also called hexanomial) coefficient array.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 80, 104, 125, 140, 146, 140, 125, 104, 80, 56, 35, 20, 10, 4, 1, 1, 5, 15, 35, 70, 126, 205, 305, 420, 540, 651, 735, 780
Offset: 0

Views

Author

Wolfdieter Lang, Jul 24 2001

Keywords

Comments

The sequence of step width of this staircase array is [1,5,5,...], hence the degree sequence for the row polynomials is [0,5,10,15,...]=A008587.
The column sequences (without leading zeros) are for k=0..5 those of the lower triangular array A007318 (Pascal) and for k=6..9: A062989, A063262-4. Row sums give A000400 (powers of 6). Central coefficients give A063419; see also A018901.
This can be used to calculate the number of occurrences of a given roll of n six-sided dice, where k is the index: k=0 being the lowest possible roll (i.e., n) and n*6 being the highest roll.

Examples

			The irregular table T(n, k) begins:
n\k 0 1 2  3  4  5  6  7  8  9 10 11 12 13 14 15
1:  1
2:  1 1 1  1  1  1
3:  1 2 3  4  5  6  5  4  3  2  1
4:  1 3 6 10 15 21 25 27 27 25 21 15 10  6  3  1
...reformatted - _Wolfdieter Lang_, Oct 31 2015
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 77,78.

Crossrefs

The q-nomial arrays for q=2..5 are: A007318 (Pascal), A027907, A008287, A035343 and for q=7: A063265, A171890, A213652, A213651.
Columns for k=0..9 (with some shifts) are: A000012, A000027, A000217, A000292, A000332, A000389, A062989, A063262, A063263, A063264.

Programs

  • Maple
    #Define the r-nomial coefficients for r = 1, 2, 3, ...
    rnomial := (r,n,k) -> add((-1)^i*binomial(n,i)*binomial(n+k-1-r*i,n-1), i = 0..floor(k/r)):
    #Display the 6-nomials as a table
    r := 6:  rows := 10:
    for n from 0 to rows do
    seq(rnomial(r,n,k), k = 0..(r-1)*n)
    end do;
    # Peter Bala, Sep 07 2013
  • Mathematica
    Flatten[Table[CoefficientList[(1 + x + x^2 + x^3 + x^4 + x^5)^n, x], {n, 0, 25}]] (* T. D. Noe, Apr 04 2011 *)
  • PARI
    concat(vector(5,k,Vec(sum(j=0,5,x^j)^k)))  \\ M. F. Hasler, Jun 17 2012

Formula

G.f. for row n: (Sum_{j=0..5} x^j)^n.
G.f. for column k: (x^(ceiling(k/5)))*N6(k, x)/(1-x)^(k+1) with the row polynomials from the staircase array A063261(k, m) and with N6(6,x) = 5 - 10*x + 10*x^2 - 5*x^3 + x^4.
T(n, k) = 0 if n=-1 or k<0 or k >= 5*n + 1; T(0, 0)=1; T(n, k) = Sum_{j=0..5} T(n-1, k-j) else.
T(n, k) = Sum_{i = 0..floor(k/6)} (-1)^i*binomial(n,i)*binomial(n+k-1-6*i,n-1) for n >= 0 and 0 <= k <= 5*n. - Peter Bala, Sep 07 2013
T(n, k) = Sum_{i = max(0,ceiling((k-2*n)/3)).. min(n,k/3)} binomial(n,i)*trinomial(n,k-3*i) for n >= 0 and 0 <= k <= 5*n. - Matthew Monaghan, Sep 30 2015

Extensions

More terms and corrected recurrence from Nicholas M. Makin (NickDMax(AT)yahoo.com), Sep 13 2002

A063265 Septinomial (also called heptanomial) coefficient array.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 33, 36, 37, 36, 33, 28, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 84, 116, 149, 180, 206, 224, 231, 224, 206, 180, 149, 116, 84, 56, 35
Offset: 0

Views

Author

Wolfdieter Lang, Jul 24 2001

Keywords

Comments

The sequence of step width of this staircase array is [1,6,6,...], hence the degree sequence for the row polynomials is [0,6,12,18,...]= A008588.
The column sequences (without leading zeros) are for k=0..6 those of the lower triangular array A007318 (Pascal) and for k=7..9: A063267, A063417, A063418. Row sums give A000420 (powers of 7). Central coefficients give A025012.

Examples

			Triangle begins:
  {1};
  {1, 1, 1, 1, 1, 1, 1};
  {1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1};
  ...
N7(k,x)= 1 for k=0..6, N7(7,x)= 6-15*x+20*x^2-15*x^3+6*x^4-x^5 (from A063266).
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 77,78.

Crossrefs

The q-nomial arrays are for q=2..8: A007318 (Pascal), A027907, A008287, A035343, A063260, A063265, A171890.

Programs

  • Maple
    #Define the r-nomial coefficients for r = 1, 2, 3, ...
    rnomial := (r,n,k) -> add((-1)^i*binomial(n,i)*binomial(n+k-1-r*i,n-1), i = 0..floor(k/r)):
    #Display the 7-nomials as a table
    r := 7:  rows := 10:
    for n from 0 to rows do
    seq(rnomial(r,n,k), k = 0..(r-1)*n)
    end do;
    # Peter Bala, Sep 07 2013
  • Mathematica
    Flatten[Table[CoefficientList[(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)^n, x], {n, 0, 25}]] (* T. D. Noe, Apr 04 2011 *)

Formula

a(n, k)=0 if n=-1 or k<0 or k >= 6*n; a(0, 0)=1; a(n, k)= sum(a(n-1, k-j), j=0..6) else.
G.f. for row n: (sum(x^j, j=0..6))^n.
G.f. for column k: (x^(ceiling(k/6)))*N7(k, x)/(1-x)^(k+1) with the row polynomials of the staircase array A063266(k, m).
T(n,k) = Sum_{i = 0..floor(k/7)} (-1)^i*binomial(n,i)*binomial(n+k-1-7*i,n-1) for n >= 0 and 0 <= k <= 6*n. - Peter Bala, Sep 07 2013

A213651 10-nomial coefficient array: Coefficients of the polynomial (1 + ... + X^9)^n, n=0,1,...

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 63, 69, 73, 75, 75, 73, 69, 63, 55, 45, 36, 28, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 282, 348, 415, 480
Offset: 0

Views

Author

M. F. Hasler, Jun 17 2012

Keywords

Comments

The n-th row also yields the number of ways to get a total of n, n+1, ..., 10n, when throwing n 10-sided dice, or summing n integers ranging from 1 to 10.
The row sums equal 10^n = A011557(n).
The row lengths are 1 + 9n = 10n - (n-1) = A017173(n).
T(n,k) is the number of integers in the [0, 10^n-1] range distributed according to the sum k of their digits. - Miquel Cerda, Jun 21 2017
The sum of the squares of the integers of the n-th row gives A174061(n). - Miquel Cerda, Jul 03 2017

Examples

			There are 1, 3, 6, 10, ... ways to score a total of 4, 5, 6, 7, ... when throwing three 10-sided dice.
The table begins as follows:
(row n=0) 1; (row sum = 1, row length = 1)
(row n=1) 1,1,1,1,1,1,1,1,1,1; (row sum = 10, row length = 10)
(row n=2) 1,2,3,4,5,6,7,8,9,10,9,8,7,6,5,4,3,2,1; (sum = 100, length = 19)
(row n=3) 1,3,6,10,15,21,28,36,45,55,63,69,73,75,75,73,...; row sum = 1000;
(row n=4) 1,4,10,20,35,56,84,120,165,220,282,348,415,...; row sum = 10^4;
etc.
Number of integers in (row n=2): k(2)=3, because in the range 0 to 99 there are 3 integers whose digits sum to 2: 2, 11 and 20. - _Miquel Cerda_, Jun 21 2017
		

Crossrefs

The q-nomial arrays are for q=2..10: A007318 (Pascal), A027907, A008287, A035343, A063260, A063265, A171890, A213652, A213651.

Programs

  • Maple
    #Define the r-nomial coefficients for r = 1, 2, 3, ...
    rnomial := (r,n,k) -> add((-1)^i*binomial(n,i)*binomial(n+k-1-r*i,n-1), i = 0..floor(k/r)):
    #Display the 10-nomials as a table
    r := 10:  rows := 10:
    for n from 0 to rows do
    seq(rnomial(r,n,k), k = 0..(r-1)*n)
    end do;
    # Peter Bala, Sep 07 2013
  • PARI
    concat(vector(5,k,Vec(sum(j=0,9,x^j)^(k-1))))

Formula

T(n,k) = Sum_{i = 0..floor(k/10)} (-1)^i*binomial(n,i)*binomial(n+k-1-10*i,n-1) for n >= 0 and 0 <= k <= 9*n. - Peter Bala, Sep 07 2013

A181567 Triangle read by rows: T(n,k) is coefficient of k-th power in expansion of ((x^(n+1)-1)/(x-1))^n.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 2, 1, 1, 3, 6, 10, 12, 12, 10, 6, 3, 1, 1, 4, 10, 20, 35, 52, 68, 80, 85, 80, 68, 52, 35, 20, 10, 4, 1, 1, 5, 15, 35, 70, 126, 205, 305, 420, 540, 651, 735, 780, 780, 735, 651, 540, 420, 305, 205, 126, 70, 35, 15, 5, 1, 1, 6, 21, 56, 126, 252, 462, 786, 1251
Offset: 0

Views

Author

Matthew Vandermast, Oct 31 2010

Keywords

Comments

In each row n>=0, k takes values from 0 to n^2 inclusive. Row sums equal A000169(n+1). All rows are palindromic. Row n is also row n of the (n+1)-nomial array (e.g., row 1 is also row 1 of A007318).
T(n,k) gives the number of divisors of A181555(n) with k prime factors counted with multiplicity. See also A001222, A071207, A146291, A146292.
T(n,k) is the number of size k submultisets of the so-called regular multiset {1_1,1_2,...,1_(n-1),1_n, ... ,i_1,i_2,...,i_(n-1),i_n, ... ,n_1,n_2,...,n_(n-1),n_n} (which contains n copies of i for 0 < i < n). - Thomas Wieder, Dec 28 2013

Examples

			Rows begin:
1;
1,1;
1,2,3,2,1;
1,3,6,10,12,12,10,6,3,1;...
T(n=3,k=4) = 12 because we have 12 submultisets (without regard of the order of elements) of size k=4 for the regular multiset (n=3) {1, 1, 1, 2, 2, 2, 3, 3, 3}: {1, 1, 1, 2}, {1, 1, 1, 3}, {1, 1, 2, 2}, {1, 1, 2, 3}, {1, 1, 3, 3}, {1, 2, 2, 2}, {1, 2, 2, 3}, {1, 2, 3, 3}, {1, 3, 3, 3}, {2, 2, 2, 3}, {2, 2, 3, 3}, {2, 3, 3, 3}.
		

Crossrefs

A163181 gives row n of n-nomial array. See also A000012, A007318, A027907, A008287, A035343, A063260, A063265, A171890.

Programs

  • Maple
    b:= proc(n, k, i) option remember; `if`(k=0, 1,
         `if`(i<1, 0, add(b(n, k-j, i-1), j=0..n)))
        end:
    T:= (n, k)-> b(n, k, n):
    seq(seq(T(n, k), k=0..n^2), n=0..8); # Alois P. Heinz, Jul 04 2016
  • Mathematica
    row[n_] := CoefficientList[((x^(n+1) - 1)/(x-1))^n + O[x]^(n^2+1), x]; Table[row[n], {n, 0, 6}] // Flatten (* Jean-François Alcover, Apr 06 2017 *)

A213652 9-nomial coefficient array: Coefficients of the polynomial (1+...+X^8)^n, n=0,1,...

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 36, 45, 52, 57, 60, 61, 60, 57, 52, 45, 36, 28, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 84, 120, 165, 216, 270, 324, 375, 420, 456, 480, 489, 480, 456
Offset: 0

Views

Author

M. F. Hasler, Jun 17 2012

Keywords

Comments

The n-th row also yields the number of ways to get a total of n, n+1,..., 9n, when summing n integers ranging from 1 to 9.
The row sums equal 9^n = A001019(n).
The row lengths are 1+8n = A017077(n).

Examples

			The triangle starts:
(row n=0) 1; (row sum = 1, row length = 1)
(row n=1) 1,1,1,1,1,1,1,1,1; (row sum = 9, row length = 9)
(row n=2) 1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1; (sum = 81, length = 17)
(row n=3) 1,3,6,10,15,21,28,36,45,52,57,60,61,60,... (sum = 729, length = 25)
(row n=4) 1, 4, 10, 20, 35, 56, 84, 120, 165, 216, 270, 324, 375, 420, 456,... (sum = 9^4; length = 33),
etc.
		

Crossrefs

The q-nomial arrays are for q=2..10: A007318 (Pascal), A027907, A008287, A035343, A063260, A063265, A171890, A213652, A213651.

Programs

  • Maple
    #Define the r-nomial coefficients for r = 1, 2, 3, ...
    rnomial := (r,n,k) -> add((-1)^i*binomial(n,i)*binomial(n+k-1-r*i,n-1), i = 0..floor(k/r)):
    #Display the 9-nomials as a table
    r := 9:  rows := 10:
    for n from 0 to rows do
    seq(rnomial(r,n,k), k = 0..(r-1)*n)
    end do; # Peter Bala, Sep 07 2013
  • PARI
    concat(vector(5,k,Vec(sum(j=0,8,x^j)^(k-1))))

Formula

T(n,k) = Sum_{i=0..floor(k/9)} (-1)^i*binomial(n,i)*binomial(n+k-1-9*i,n-1) for n >= 0 and 0 <= k <= 8*n. - Peter Bala, Sep 07 2013

A273975 Three-dimensional array written by antidiagonals in k,n: T(k,n,h) with k >= 1, n >= 0, 0 <= h <= n*(k-1) is the coefficient of x^h in the polynomial (1 + x + ... + x^(k-1))^n = ((x^k-1)/(x-1))^n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 3, 2, 1, 1, 3, 6, 7, 6, 3, 1, 1, 4, 6, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 3, 6, 10, 12, 12, 10, 6, 3, 1, 1, 4, 10
Offset: 1

Views

Author

Andrey Zabolotskiy, Nov 10 2016

Keywords

Comments

Equivalently, T(k,n,h) is the number of ordered sets of n nonnegative integers < k with the sum equal to h.
From Juan Pablo Herrera P., Nov 21 2016: (Start)
T(k,n,h) is the number of possible ways of randomly selecting h cards from k-1 sets, each with n different playing cards. It is also the number of lattice paths from (0,0) to (n,h) using steps (1,0), (1,1), (1,2), ..., (1,k-1).
Shallow diagonal sums of each triangle with fixed k give the k-bonacci numbers. (End)
T(k,n,h) is the number of n-dimensional grid points of a k X k X ... X k grid, which are lying in the (n-1)-dimensional hyperplane which is at an L1 distance of h from one of the grid's corners, and normal to the corresponding main diagonal of the grid. - Eitan Y. Levine, Apr 23 2023

Examples

			For first few k and for first few n, the rows with h = 0..n*(k-1) are given:
k=1:  1;  1;  1;  1;  1; ...
k=2:  1;  1, 1;  1, 2, 1;  1, 3, 3, 1;  1, 4, 6, 4, 1; ...
k=3:  1;  1, 1, 1;  1, 2, 3, 2, 1;  1, 3, 6, 7, 6, 3, 1; ...
k=4:  1;  1, 1, 1, 1;  1, 2, 3, 4, 3, 2, 1; ...
For example, (1 + x + x^2)^3 = 1 + 3*x + 6*x^2 + 7*x^3 + 6*x^4 + 3*x^5 + x^6, hence T(3,3,2) = T(3,3,4) = 6.
From _Eitan Y. Levine_, Apr 23 2023: (Start)
Example for the repeated cumulative sum formula, for (k,n)=(3,3) (each line is the cumulative sum of the previous line, and the first line is the padded, alternating 3rd row from Pascal's triangle):
  1  0  0 -3  0  0  3  0  0 -1
  1  1  1 -2 -2 -2  1  1  1
  1  2  3  1 -1 -3 -2 -1
  1  3  6  7  6  3  1
which is T(3,3,h). (End)
		

Crossrefs

k-nomial arrays for fixed k=1..10: A000012, A007318, A027907, A008287, A035343, A063260, A063265, A171890, A213652, A213651.
Arrays for fixed n=0..6: A000012, A000012, A004737, A109439, A277949, A277950, A277951.
Central n-nomial coefficients for n=1..9, i.e., sequences with h=floor(n*(k-1)/2) and fixed n: A000012, A000984 (A001405), A002426, A005721 (A005190), A005191, A063419 (A018901), A025012, (A025013), A025014, A174061 (A025015), A201549, (A225779), A201550. Arrays: A201552, A077042, see also cfs. therein.
Triangle n=k-1: A181567. Triangle n=k: A163181.

Programs

  • Mathematica
    a = Table[CoefficientList[Sum[x^(h-1),{h,k}]^n,x],{k,10},{n,0,9}];
    Flatten@Table[a[[s-n,n+1]],{s,10},{n,0,s-1}]
    (* alternate program *)
    row[k_, n_] := Nest[Accumulate,Upsample[Table[((-1)^j)*Binomial[n,j],{j,0,n}],k],n][[;;n*(k-1)+1]] (* Eitan Y. Levine, Apr 23 2023 *)

Formula

T(k,n,h) = Sum_{i = 0..floor(h/k)} (-1)^i*binomial(n,i)*binomial(n+h-1-k*i,n-1). [Corrected by Eitan Y. Levine, Apr 23 2023]
From Eitan Y. Levine, Apr 23 2023: (Start)
(T(k,n,h))_{h=0..n*(k-1)} = f(f(...f(g(P))...)), where:
(x_i)_{i=0..m} denotes a tuple (in particular, the LHS contains the values for 0 <= h <= n*(k-1)),
f repeats n times,
f((x_i){i=0..m}) = (Sum{j=0..i} x_j)_{i=0..m} is the cumulative sum function,
g((x_i){i=0..m}) = (x(i/k) if k|i, otherwise 0)_{i=0..m*k} is adding k-1 zeros between adjacent elements,
and P=((-1)^i*binomial(n,i))_{i=0..n} is the n-th row of Pascal's triangle, with alternating signs. (End)
From Eitan Y. Levine, Jul 27 2023: (Start)
Recurrence relations, the first follows from the sequence's defining polynomial as mentioned in the Smarandache link:
T(k,n+1,h) = Sum_{i = 0..s-1} T(k,n,h-i)
T(k+1,n,h) = Sum_{i = 0..n} binomial(n,i)*T(k,n-i,h-i*k) (End)

A163181 T(n,k) is the number of weak compositions of k into n parts no greater than (n-1) for n>=1, 0<=k<=n(n-1).

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 6, 7, 6, 3, 1, 1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1, 1, 5, 15, 35, 70, 121, 185, 255, 320, 365, 381, 365, 320, 255, 185, 121, 70, 35, 15, 5, 1, 1, 6, 21, 56, 126, 252, 456, 756, 1161, 1666, 2247, 2856, 3431, 3906, 4221, 4332, 4221, 3906, 3431
Offset: 1

Views

Author

Geoffrey Critzer, Jul 22 2009

Keywords

Comments

T(n,k) is the number of length n sequences on an alphabet of {0,1,2,...,n-1} that have a sum of k. Equivalently T(n,k) is the number of functions f:{1,2,...,n}->{0,1,2,...,n-1} such that Sum(f(i)=k, i=1...n).
Row n is also row n of the array of q-nomial coefficients. - Matthew Vandermast, Oct 31 2010

Examples

			T(3,4) = 6 because there are 6 ternary sequences of length three that sum to 4: [0, 2, 2], [1, 1, 2], [1, 2, 1], [2, 0, 2], [2, 1, 1], [2, 2, 0].
		

Crossrefs

The maximum of row n is in column k=n(n-1)/2 = A000217(n-1).
For q-nomial arrays, see A000012, A007318, A027907, A008287, A035343, A063260, A063265, A171890. See also A181567. - Matthew Vandermast, Oct 31 2010

Programs

  • Maple
    b:= proc(n, k, l) option remember; `if`(k=0, 1,
          `if`(l=0, 0, add(b(n, k-j, l-1), j=0..min(n-1, k))))
        end:
    T:= (n, k)-> b(n, k, n):
    seq(seq(T(n, k), k=0..n*(n-1)), n=1..8);  # Alois P. Heinz, Feb 21 2013
  • Mathematica
    (*warning very inefficient*) Table[Distribution[Map[Total, Strings[Range[n], n]]], {n, 1, 6}]//Grid
    nn=100;Table[CoefficientList[Series[Sum[x^i,{i,0,n-1}]^n,{x,0,nn}],x],{n,1,10}]//Grid (* Geoffrey Critzer, Feb 21 2013*)

Formula

O.g.f. for row n is ((1-x^n)/(1-x))^n. For k<=(n-1), T(n,k) = C(n+k-1,k).
Showing 1-10 of 11 results. Next