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.

Previous Showing 11-20 of 21 results. Next

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)

A063261 Coefficient array for certain numerator polynomials N6(n,x), n >= 0 (rising powers of x).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 5, -10, 10, -5, 1, 4, -5, 0, 5, -4, 1, 3, 0, -10, 15, -9, 2, 2, 5, -20, 25, -14, 3, 1, 10, -30, 35, -19, 4, 15, -40, 45, -24, 5, 10, -5, -65, 181, -246, 210, -120, 45, -10, 1, 6, 20, -130, 266, -287, 168, -30, -30, 25, -8, 1
Offset: 0

Views

Author

Wolfdieter Lang, Jul 24 2001

Keywords

Comments

The g.f. of column k of array A063260(n,k) (sextinomial coefficients) is (x^(ceiling(k/5)))*N6(k,x)/(1-x)^(k+1).
The sequence of degrees for the polynomials N6(n,x) is [0,0,0,0,0,0,4,5,5,5,5,4,9,10,10,...] for n >= 0.
Row sums N6(n,1)=1 for all n.

Examples

			{1}; {1}; {1}; {1}; {1}; {1}; {5, -10, 10, -5, 1}; {4, -5, 0, 5, -4, 1}; ...
c=2: b(2,1)=b(2,2)=1, b(2,j)=0 for j=3,4,5.
N6(7,x)=4-5*x+0*x^2+5*x^3-4*x^4+x^5.
		

Formula

a(n, m) = [x^m]N6(n, x), n, m >= 0, with N6(n, x)= sum(((1-x)^(j-1))*(x^(b(c(n), j)))*N6(n-j, x), j=1..5), N6(n, x)= 1 for n=0, 1, 2, 3, 4 and b(c(n), j) := 1 if 1<= j <= c(n) else 0, with c(n) := 4 if mod(n, 5)=0 else c(n) := mod(n, 5)-1; (hence b(0, j)=0, j=1..5).

A102422 Number of partitions of n with k <= 5 parts and each part p <= 5.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 9, 11, 14, 16, 18, 19, 20, 20, 19, 18, 16, 14, 11, 9, 7, 5, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Thomas Wieder, Jan 09 2005

Keywords

Comments

There are only 26 nonzero terms.
Contribution from Toby Gottfried, Feb 19 2009: (Start)
a(n) is the number of partitions of n+5 into exactly 5 parts with each part p: 1 <= p <= 6
i.e. the number of different ways to get a total of n+5 with 5 (normal, 6-sided) dice in any order (End)

Examples

			a(7)=11 because we can write 7=1+2+2+2 or 5+2 or 1+2+4 or 3+4 or 1+3+3 or 1+1+1+1+3 or 1+1+2+3 or 2+2+3 or 1+1+1+2+2 1+1+1+4 or 1+1+5.
A total of 8 comes from 1+1+1+1+4, 1+1+1+2+3, 1+1+2+2+2 and a(3) = 3 [8 = 3+5] [From _Toby Gottfried_, Feb 19 2009]
		

Crossrefs

See A102420 for k=5 and p<=5.
Contribution from Toby Gottfried, Feb 19 2009: (Start)
A102420 has the numbers for 4 dice
A063260 gives the number of permuted rolls of each possible total for any number of dice. (End)

Formula

G.f.: = 1+z+2*z^2+3*z^3+5*z^4+7*z^5+9*z^6+11*z^7+14*z^8+16*z^9+18*z^10+19*z^11+20*z^12+20*z^13+19*z^14+18*z^15+16*z^16+14*z^17+11*z^18+9*z^19 +7*z^20+5*z^21+3*z^22+2*z^23+z^24+z^25.

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).

A349933 Array read by ascending antidiagonals: the s-th column gives the central s-binomial coefficients.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 6, 3, 1, 1, 20, 19, 4, 1, 1, 70, 141, 44, 5, 1, 1, 252, 1107, 580, 85, 6, 1, 1, 924, 8953, 8092, 1751, 146, 7, 1, 1, 3432, 73789, 116304, 38165, 4332, 231, 8, 1, 1, 12870, 616227, 1703636, 856945, 135954, 9331, 344, 9, 1, 1, 48620, 5196627, 25288120, 19611175, 4395456, 398567, 18152, 489, 10, 1
Offset: 0

Views

Author

Stefano Spezia, Dec 06 2021

Keywords

Examples

			The array begins:
n\s |   0     1     2     3     4
----+----------------------------
  0 |   1     1     1     1     1 ...
  1 |   1     2     3     4     5 ...
  2 |   1     6    19    44    85 ...
  3 |   1    20   141   580  1751 ...
  4 |   1    70  1107  8092 38165 ...
  ...
		

Crossrefs

Cf. A000984 (s=1), A082758 (s=2), A005721 (s=3), A349936 (s=4), A063419 (s=5), A270918 (n=s), A163269 (s>0).

Programs

  • Mathematica
    T[n_,k_,s_]:=If[k==0,1,Coefficient[(Sum[x^i,{i,0,s}])^n,x^k]]; A[n_,s_]:=T[2n,s n,s]; Flatten[Table[A[n-s,s],{n,0,9},{s,0,n}]]

Formula

A(n, s) = T(2*n, s*n, s), where T(n, k, s) is the s-binomial coefficient defined as the coefficient of x^k in (Sum_{i=0..s} x^i)^n.

A056150 Number of combinations for each possible sum when throwing 3 (normal) dice.

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1
Offset: 3

Views

Author

Joe Slater (joe(AT)yoyo.cc.monash.edu.au), Aug 05 2000

Keywords

Comments

The 3rd row of A063260. - Michel Marcus, Mar 04 2013

Examples

			Using three normal (six-sided) dice we can produce a sum of 3 in just one way: 1,1,1. We can produce a sum of 4 in three ways: 1,1,2; 1,2,1; 2,1,1. We can produce a sum of 5 in 6 ways and so on.
		

Crossrefs

A108907 gives sums for 6 dice.
A166322 gives sums for 7 dice.
A063260 gives the sums for 2 dice through to 6 dice.

Programs

  • Mathematica
    Transpose[Tally[Total/@Tuples[Range[6],{3}]]][[2]] (* Harvey P. Dale, Dec 17 2014 *)
  • PARI
    Vec(((sum(k=1,6,x^k))^3+O(x^66))) /* Joerg Arndt, Mar 04 2013 */

Extensions

Corrected by Rick L. Shepherd, May 24 2002

A108907 Number of times a point sum n is attained in all 6^6 permutations of throwing 6 dice.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 6, 21, 56, 126, 252, 456, 756, 1161, 1666, 2247, 2856, 3431, 3906, 4221, 4332, 4221, 3906, 3431, 2856, 2247, 1666, 1161, 756, 456, 252, 126, 56, 21, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Zdenek Hrubec (zhrubec(AT)yahoo.com), Aug 17 2008

Keywords

Comments

The lowest number that can occur is 6 and the highest is 36 and these can be obtained in only a single combination. The number 7 can occur in 6 different ways: 11-11-12, 11-11-21, 11-12-11, 11-21-11, 12-11-11, 21-11-11, etc.
The sixth row of A063260. - R. J. Mathar, Aug 27 2008

Crossrefs

Cf. A019500.
A056150 gives sums for 3 dice.
A166322 gives sums for 7 dice.
A063260 gives the sums for 2 dice through to 6 dice.

Programs

  • PARI
    v=Vec(('c0+(sum(k=1,6,x^k))^6+O(x^66)));  v[1]-='c0; v /* Joerg Arndt, Mar 04 2013 */

Formula

O.g.f.: (1+x+x^2+x^3+x^4+x^5+x^6)^6. - R. J. Mathar, Aug 27 2008
a(n) = 0 for n > 36.

Extensions

Edited by N. J. A. Sloane, Jan 17 2009

A166322 The number of times a point sum n is attained in all 7^6 permutations of throwing 7 dice.

Original entry on oeis.org

1, 7, 28, 84, 210, 462, 917, 1667, 2807, 4417, 6538, 9142, 12117, 15267, 18327, 20993, 22967, 24017, 24017, 22967, 20993, 18327, 15267, 12117, 9142, 6538, 4417, 2807, 1667, 917, 462, 210, 84, 28, 7, 1
Offset: 7

Views

Author

Robert Goodhand (robert(AT)rgoodhand.fsnet.co.uk), Oct 11 2009

Keywords

Comments

The sum for any number of dice can be obtained by summing the trailing six terms of the sequence above - assuming leading zeros.
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 125 104 80 56 35 20 10 4 1
etc.

Crossrefs

A056150 gives sums for 3 dice.
A108907 gives sums for 6 dice.
A063260 gives the sums for 2 dice through to 6 dice.

Programs

  • PARI
    Vec(((sum(k=1,6,x^k))^7+O(x^66))) \\ Joerg Arndt, Mar 04 2013

Formula

F_{s,i}(k)= sum(n=0, floor((k-i)/s), (-1)^n*binomial(n,i)*binomial(i-1,k-s*n-1)).
Previous Showing 11-20 of 21 results. Next