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

A134394 Triangle T(n,k) = Sum_{j=k..n} A077028(j,k), read by rows.

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 6, 4, 1, 5, 10, 9, 5, 1, 6, 15, 16, 12, 6, 1, 7, 21, 25, 22, 15, 7, 1, 8, 28, 36, 35, 28, 18, 8, 1, 9, 36, 49, 51, 45, 34, 21, 9, 1, 10, 45, 64, 70, 66, 55, 40, 24, 10, 1, 11, 55, 81, 92, 91, 81, 65, 46, 27, 11, 1, 12, 66, 100, 117, 120, 112, 96, 75, 52, 30, 12, 1, 13, 78, 121, 145, 153
Offset: 1

Views

Author

Gary W. Adamson, Oct 23 2007

Keywords

Comments

Row sums = A055795: (1, 3, 7, 15, 30, 56, 98, ...).
Antidiagonal reading of A139600 without its left column. - R. J. Mathar, Apr 17 2011

Examples

			First few rows of the triangle:
  1;
  2,  1;
  3,  3,  1;
  4,  6,  4,  1;
  5, 10,  9,  5,  1;
  6, 15, 16, 12,  6,  1;
  7, 21, 25, 22, 15,  7,  1;
		

Crossrefs

Programs

  • Maple
    A077028 := proc(n,k) if n < 0 or k<0 or k > n then 0; else k*(n-k)+1 ; end if; end proc:
    A134394 := proc(n,k) add ( A077028(j,k),j=k..n) ; end proc:
    seq(seq(A134394(n,k),k=0..n),n=0..15) ; # R. J. Mathar, Apr 17 2011

Formula

A000012 * A077028 as infinite lower triangular matrices.
T(n,k) = (k-n-1)*(k*(k-n)-2)/2. - R. J. Mathar, Apr 17 2011

A134395 A007318 * A077028.

Original entry on oeis.org

1, 2, 1, 4, 4, 1, 8, 12, 6, 1, 16, 32, 23, 8, 1, 32, 80, 72, 37, 10, 1, 64, 192, 201, 132, 54, 12, 1, 128, 448, 522, 405, 216, 74, 14, 1, 256, 1024, 1291, 1128, 723, 328, 97, 16, 1, 512, 2304, 3084, 2941, 2154, 1191, 472, 123, 18, 1, 1024, 5120, 7181, 7316, 5920, 3788, 1850, 652, 152, 20, 1
Offset: 0

Views

Author

Gary W. Adamson, Oct 23 2007

Keywords

Comments

Row sums = A134396: (1, 3, 9, 27, 80, 232, 656, ...).

Examples

			First few rows of the triangle:
   1;
   2,  1;
   4,  4,  1;
   8, 12,  6,  1;
  16, 32, 23,  8,  1;
  32, 80, 72, 37, 10,  1;
  ...
		

Crossrefs

Programs

  • Maple
    A007318 := proc(n,k) binomial(n,k) ; end: A077028 := proc(i,j) if j <= i then (i-j)*(j-1)+1 ; else 0 ; fi ; end: A134395 := proc(n,m) add(A007318(n,k)*A077028(k+1,m+1),k=0..n) ; end: for n from 0 to 15 do for m from 0 to n do printf("%d,",A134395(n,m)) ; od: od: # R. J. Mathar, Jun 08 2008

Formula

A007318 * A077028 as infinite lower triangular matrices.

Extensions

Corrected and extended by R. J. Mathar, Jun 08 2008

A110552 A triangular array related to A077028 and distributing the values of A007582.

Original entry on oeis.org

1, 1, 2, 1, 5, 4, 1, 10, 17, 8, 1, 19, 51, 49, 16, 1, 36, 134, 196, 129, 32, 1, 69, 330, 650, 645, 321, 64, 1, 134, 783, 1940, 2575, 1926, 769, 128, 1, 263, 1813, 5411, 8995, 8981, 5383, 1793, 256, 1, 520, 4124, 14392, 28742, 35896, 28700, 14344, 4097, 512, 1, 1033, 9252, 36948, 86142, 129150, 129108, 86052, 36873, 9217, 1024
Offset: 1

Views

Author

Alford Arnold, Jul 26 2005

Keywords

Comments

Let T(r,c) be the array A077028. Fill 2^k numbers in Gaussian templates conforming to the row lengths determined by T(r,c). A110552 results from summing the numbers on each row.

Examples

			The filled templates begin
1
.1
.2
..1
..2.3
..4
....1
....2.3.5
....4.6.7
....8
therefore the sequence begins
1
1 2
1 5 4
1 10 17 8
...
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := Binomial[n - 2, k - 1] + 2^(n - 1)*Binomial[n - 2, k - 2]; Table[T[n, k], {n, 1, 20}, {k, 1, n}] // Flatten (* G. C. Greubel, Aug 31 2017 *)
  • PARI
    for(n=1,20, for(k=1,n, print1(binomial(n - 2, k - 1) + 2^(n - 1)*binomial(n - 2, k - 2), ", "))) \\ G. C. Greubel, Aug 31 2017

Formula

Table entries appear to be given by T(n,k) = binomial(n-2,k-1) + 2^(n-1)*binomial(n-2,k-2), n,k >= 1, leading to the e.g.f. (exp((1+x)*u) - 1)*(x*exp((1+x)*u) + x + 2)/(2*(1+x)^2) = u + (1+2*x)*u^2/2! + (1+5*x+4*x^2)*u^3/3! + .... Cf. A111049. - Peter Bala, Jul 27 2012

A124326 T(n,m) = A007318(n,m) - A077028(n,m).

Original entry on oeis.org

1, 3, 3, 6, 10, 6, 10, 22, 22, 10, 15, 40, 53, 40, 15, 21, 65, 105, 105, 65, 21, 28, 98, 185, 226, 185, 98, 28, 36, 140, 301, 431, 431, 301, 140, 36, 45, 192, 462, 756, 887, 756, 462, 192, 45, 55, 255, 678, 1246, 1673, 1673, 1246, 678, 255, 55, 66, 330, 960, 1956, 2954
Offset: 1

Views

Author

Roger L. Bagula, Jun 26 2007

Keywords

Comments

First term of n-th row is n*(n+1)/2.
Row sum are A002663 (without initial zeros).
Appears to be the triangle resulting from adding the row number (first row numbered 0) of Pascal's triangle (A007318) to each entry in that row, subtracting the corresponding entries in the triangle formed by taking the finite diagonals in the multiplication table in order of increasing length (A003991), and removing the outer two layers, which consist entirely of 0's.
Each value of the sequence T(x,y) is equal to the sum of all values in A014430 that are in the rectangle defined by the tip (0,0) and the position (x,y). - Jon Perry, Sep 11 2013

Examples

			Table begins
   1;
   3,   3;
   6,  10,   6;
  10,  22,  22,  10;
  15,  40,  53,  40,  15;
  21,  65, 105, 105,  65,  21;
  28,  98, 185, 226, 185,  98,  28;
  36, 140, 301, 431, 431, 301, 140,  36;
  45, 192, 462, 756, 887, 756, 462, 192,  45;
  ...
If the zeros are included, the table begins
   0;
   0, 0;
   0, 0, 0;
   0, 0, 0, 0;
   0, 0, 1, 0, 0;
   0, 0, 3, 3, 0, 0;
   0, 0, 6, 10, 6, 0, 0;
   0, 0, 10, 22, 22, 10, 0, 0;
   ... - from _Michael De Vlieger_, May 27 2024
		

Crossrefs

Programs

  • Mathematica
    a = Table[Flatten[Table[If[Binomial[m, n] - (1 +n (m - n)) == 0, {}, Binomial[m, n] - (1 + n (m - n))], {n, 0, m}]], {m, 0, 14}]

Formula

T(n,m) = A007318(n,m) - A077028(n,m) (skipping zeros).

A134392 A077028 * A000012, that is Rascal's triangle (as matrix) multiplied by a lower triangular matrix of ones (main diagonal of ones included).

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 7, 4, 1, 15, 14, 10, 5, 1, 26, 25, 20, 13, 6, 1, 42, 41, 35, 26, 16, 7, 1, 64, 63, 56, 45, 32, 19, 8, 1, 93, 92, 84, 71, 55, 38, 22, 9, 1, 130, 129, 120, 105, 86, 65, 44, 25, 10, 1, 176, 175, 165, 148, 126, 101, 75, 50, 28, 11, 1
Offset: 1

Views

Author

Gary W. Adamson, Oct 23 2007

Keywords

Comments

Left border = A000125.
Row sums = A134393.

Examples

			First few rows of the triangle:
   1;
   2,  1;
   4,  3,  1;
   8,  7,  4,  1;
  15, 14, 10,  5,  1;
  26, 25, 20, 13,  6,  1;
  42, 41, 35, 26, 16,  7,  1;
  ...
		

Crossrefs

Programs

  • Mathematica
    rows = 11;
    R[n_, k_] /; k <= n := k (n - k) + 1; R[0, 0] = 1; R[, ] = 0;
    MR = Table[R[n, k], {n, 0, rows-1}, {k, 0, rows-1}];
    MB = Table[Boole[0 <= k <= n], {n, 0, rows-1}, {k, 0, rows -1}];
    T = MR.MB;
    Table[T[[n, k]], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Apr 01 2020 *)

Formula

A077028 * A000012 as infinite lower triangular matrices.
Triangle read by rows, partial sums starting from the right of A077028.

Extensions

Typos corrected by Jean-François Alcover, Apr 01 2020

A338291 Matrix inverse of the rascal triangle (A077028), read across rows.

Original entry on oeis.org

1, -1, 1, 1, -2, 1, -1, 3, -3, 1, 2, -6, 7, -4, 1, -6, 18, -21, 13, -5, 1, 24, -72, 84, -52, 21, -6, 1, -120, 360, -420, 260, -105, 31, -7, 1, 720, -2160, 2520, -1560, 630, -186, 43, -8, 1, -5040, 15120, -17640, 10920, -4410, 1302, -301, 57, -9, 1
Offset: 0

Views

Author

Werner Schulte, Oct 20 2020

Keywords

Comments

The columns of this triangle are related to factorial numbers (A000142).
There is a family of triangles T(m;n,k) = 1 + m*k*(n-k) for some fixed integer m (for m >= 0 see A296180, Comments) and 0 <= k <= n. They satisfy the equation T(-m;n,k) = 2 - T(m;n,k). The corresponding matrices inverse M = T^(-1) are given by: M(m;n,n) = 1 for n >= 0, and M(m;n,n-1) = m*(1-n) - 1 for n > 0, and M(m;n,k) = (-1)^(n-k) * m * (m * k*(k+1) + 1) * Product_{i=k+1..n-2} (m*(i+1) - 1) for 0 <= k <= n-2. For special cases of the M(m;n,k) see A338817 (m=-1), and A167374 (m=0), and this triangle (m=1).

Examples

			The triangle T(n,k) for 0 <= k <= n starts:
n\k :      0      1       2      3      4     5     6   7   8  9
================================================================
  0 :      1
  1 :     -1      1
  2 :      1     -2       1
  3 :     -1      3      -3      1
  4 :      2     -6       7     -4      1
  5 :     -6     18     -21     13     -5     1
  6 :     24    -72      84    -52     21    -6     1
  7 :   -120    360    -420    260   -105    31    -7   1
  8 :    720  -2160    2520  -1560    630  -186    43  -8   1
  9 :  -5040  15120  -17640  10920  -4410  1302  -301  57  -9  1
etc.
		

Crossrefs

Programs

  • PARI
    for(n=0,10,for(k=0,n,if(k==n,print(" 1"),if(k==n-1,print1(-n,", "),print1((-1)^(n-k)*(k^2+k+1)*(n-2)!/k!,", ")))))
    
  • PARI
    1/matrix(10, 10, n, k, n--; k--; if (n>=k, k*(n-k) + 1)) \\ Michel Marcus, Nov 11 2020

Formula

T(n,n) = 1 for n >= 0, and T(n,n-1) = -n for n > 0, and T(n,n-2) = n^2 - 3*n + 3 for n > 1, and T(n,k) = (-1)^(n-k) * (k^2 + k + 1) * (n-2)! / k! for 0 <= k <= n-2.
T(n,k) = (2-n) * T(n-1,k) for 0 <= k < n-2.
T(n,k) = T(k+2,k) * (-1)^(n-k) * (n-2)! / k! for 0 <= k <= n-2.
Row sums are A000007(n) for n >= 0.

A057145 Square array of polygonal numbers T(n,k) = ((n-2)*k^2 - (n-4)*k)/2, n >= 2, k >= 1, read by antidiagonals upwards.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 4, 6, 4, 1, 5, 9, 10, 5, 1, 6, 12, 16, 15, 6, 1, 7, 15, 22, 25, 21, 7, 1, 8, 18, 28, 35, 36, 28, 8, 1, 9, 21, 34, 45, 51, 49, 36, 9, 1, 10, 24, 40, 55, 66, 70, 64, 45, 10, 1, 11, 27, 46, 65, 81, 91, 92, 81, 55, 11, 1, 12, 30, 52, 75, 96, 112
Offset: 2

Views

Author

N. J. A. Sloane, Sep 12 2000

Keywords

Comments

The set of the "nontrivial" entries T(n>=3,k>=3) is in A090466. - R. J. Mathar, Jul 28 2016
T(n,k) is the smallest number that can be expressed as the sum of k consecutive positive integers that differ by n - 2. In other words: T(n,k) is the sum of k terms of the arithmetic progression with common difference n - 2 and 1st term 1, (see the example). - Omar E. Pol, Apr 29 2020

Examples

			Array T(n k) (n >= 2, k >= 1) begins:
  1,  2,  3,  4,   5,   6,   7,   8,   9,  10,  11, ...
  1,  3,  6, 10,  15,  21,  28,  36,  45,  55,  66, ...
  1,  4,  9, 16,  25,  36,  49,  64,  81, 100, 121, ...
  1,  5, 12, 22,  35,  51,  70,  92, 117, 145, 176, ...
  1,  6, 15, 28,  45,  66,  91, 120, 153, 190, 231, ...
  1,  7, 18, 34,  55,  81, 112, 148, 189, 235, 286, ...
  1,  8, 21, 40,  65,  96, 133, 176, 225, 280, 341, ...
  1,  9, 24, 46,  75, 111, 154, 204, 261, 325, 396, ...
  1, 10, 27, 52,  85, 126, 175, 232, 297, 370, 451, ...
  1, 11, 30, 58,  95, 141, 196, 260, 333, 415, 506, ...
  1, 12, 33, 64, 105, 156, 217, 288, 369, 460, 561, ...
  1, 13, 36, 70, 115, 171, 238, 316, 405, 505, 616, ...
  1, 14, 39, 76, 125, 186, 259, 344, 441, 550, 671, ...
-------------------------------------------------------
From _Wolfdieter Lang_, Nov 04 2014: (Start)
The triangle a(k, m) begins:
  k\m 1  2  3  4  5   6   7   8   9  10  11  12 13 14 ...
  2:  1
  3:  1  2
  4:  1  3  3
  5:  1  4  6  4
  6:  1  5  9 10  5
  7:  1  6 12 16 15   6
  8:  1  7 15 22 25  21   7
  9:  1  8 18 28 35  36  28   8
  10: 1  9 21 34 45  51  49  36   9
  11: 1 10 24 40 55  66  70  64  45  10
  12: 1 11 27 46 65  81  91  92  81  55  11
  13: 1 12 30 52 75  96 112 120 117 100  66  12
  14: 1 13 33 58 85 111 133 148 153 145 121  78 13
  15: 1 14 36 64 95 126 154 176 189 190 176 144 91 14
  ...
-------------------------------------------------------
a(2,1) = T(2,1), a(6, 3) = T(4, 3). (End)
.
From _Omar E. Pol_, May 03 2020: (Start)
Illustration of the corner of the square array:
.
  1       2         3           4
  O     O O     O O O     O O O O
.
  1       3         6          10
  O     O O     O O O     O O O O
          O       O O       O O O
                    O         O O
                                O
.
  1       4         9          16
  O     O O     O O O     O O O O
          O       O O       O O O
          O       O O       O O O
                    O         O O
                    O         O O
                                O
                                O
.
  1       5        12          22
  O     O O     O O O     O O O O
          O       O O       O O O
          O       O O       O O O
          O       O O       O O O
                    O         O O
                    O         O O
                    O         O O
                                O
                                O
                                O
(End)
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, p. 189, 1966.
  • J. H. Conway and R. K. Guy, The Book of Numbers, Springer-Verlag (Copernicus), p. 38, 1996.

Crossrefs

Many rows and columns of this array are in the database.
Cf. A055795 (antidiagonal sums), A064808 (main diagonal).

Programs

  • Magma
    /* As square array: */ t:=func; [[t(s,n): s in [1..11]]: n in [2..14]]; // Bruno Berselli, Jun 24 2013
  • Maple
    A057145 := proc(n,k)
        ((n-2)*k^2-(n-4)*k)/2 ;
    end proc:
    seq(seq(A057145(d-k,k),k=1..d-2),d=3..12); # R. J. Mathar, Jul 28 2016
  • Mathematica
    nn = 12; Flatten[Table[k (3 - k^2 - n + k*n)/2, {n, 2, nn}, {k, n - 1}]] (* T. D. Noe, Oct 10 2012 *)

Formula

T(2n+4,n) = n^3. - Stuart M. Ellerstein (ellerstein(AT)aol.com), Aug 28 2000
T(n, k) = T(n-1, k) + k*(k-1)/2 [with T(2, k)=k] = T(n, k-1) + 1 + (n-2)*(k-1) [with T(n, 0)=0] = k + (n-2)k(k-1)/2 = k + A063212(n-2, k-1). - Henry Bottomley, Jul 11 2001
G.f. for row n: x*(1+(n-3)*x)/(1-x)^3, n>=2. - Paul Barry, Feb 21 2003
From Wolfdieter Lang, Nov 05 2014: (Start)
The triangle is a(n, m) = T(n-m+1, m) = (1/2)*m*(n*(m-1) + 3 - m^2) for n >= 2, m = 1, 2, ..., n-1 and zero elsewhere.
O.g.f. for column m (without leading zeros): (x*binomial(m,2) + (1+2*m-m^2)*(m/2)*(1-x))/(x^(m-1)*(1-x)^2). (End)
T(n,k) = A139600(n-2,k) = A086270(n-2,k). - R. J. Mathar, Jul 28 2016
Row sums of A077028: T(n+2,k+1) = Sum_{j=0..k} A077028(n,j), where A077028(n,k) = 1+n*k is the square array interpretation of A077028 (the 1D polygonal numbers). - R. J. Mathar, Jul 30 2016
G.f.: x^2*y*(1 - x - y + 2*x*y)/((1 - x)^2*(1 - y)^3). - Stefano Spezia, Apr 12 2024

Extensions

a(50)=49 corrected to a(50)=40 by Jean-François Alcover, Jul 22 2011
Edited: Name shortened, offset in Paul Barry's g.f. corrected and Conway-Guy reference added. - Wolfdieter Lang, Nov 04 2014

A000125 Cake numbers: maximal number of pieces resulting from n planar cuts through a cube (or cake): C(n+1,3) + n + 1.

Original entry on oeis.org

1, 2, 4, 8, 15, 26, 42, 64, 93, 130, 176, 232, 299, 378, 470, 576, 697, 834, 988, 1160, 1351, 1562, 1794, 2048, 2325, 2626, 2952, 3304, 3683, 4090, 4526, 4992, 5489, 6018, 6580, 7176, 7807, 8474, 9178, 9920, 10701, 11522, 12384, 13288, 14235, 15226
Offset: 0

Views

Author

Keywords

Comments

Note that a(n) = a(n-1) + A000124(n-1). This has the following geometrical interpretation: Define a number of planes in space to be in general arrangement when
(1) no two planes are parallel,
(2) there are no two parallel intersection lines,
(3) there is no point common to four or more planes.
Suppose there are already n-1 planes in general arrangement, thus defining the maximal number of regions in space obtainable by n-1 planes and now one more plane is added in general arrangement. Then it will cut each of the n-1 planes and acquire intersection lines which are in general arrangement. (See the comments on A000124 for general arrangement with lines.) These lines on the new plane define the maximal number of regions in 2-space definable by n-1 straight lines, hence this is A000124(n-1). Each of this regions acts as a dividing wall, thereby creating as many new regions in addition to the a(n-1) regions already there, hence a(n) = a(n-1) + A000124(n-1). - Peter C. Heinig (algorithms(AT)gmx.de), Oct 19 2006
More generally, we have: A000027(n) = binomial(n,0) + binomial(n,1) (the natural numbers), A000124(n) = binomial(n,0) + binomial(n,1) + binomial(n,2) (the Lazy Caterer's sequence), a(n) = binomial(n,0) + binomial(n,1) + binomial(n,2) + binomial(n,3) (Cake Numbers). - Peter C. Heinig (algorithms(AT)gmx.de), Oct 19 2006
If Y is a 2-subset of an n-set X then, for n>=3, a(n-3) is the number of 3-subsets of X which do not have exactly one element in common with Y. - Milan Janjic, Dec 28 2007
a(n) is the number of compositions (ordered partitions) of n+1 into four or fewer parts or equivalently the sum of the first four terms in the n-th row of Pascal's triangle. - Geoffrey Critzer, Jan 23 2009
{a(k): 0 <= k < 4} = divisors of 8. - Reinhard Zumkeller, Jun 17 2009
a(n) is also the maximum number of different values obtained by summing n consecutive positive integers with all possible 2^n sign combinations. This maximum is first reached when summing the interval [n, 2n-1]. - Olivier Gérard, Mar 22 2010
a(n) contains only 5 perfect squares > 1: 4, 64, 576, 67600, and 75203584. The incidences of > 0 are given by A047694. - Frank M Jackson, Mar 15 2013
Given n tiles with two values - an A value and a B value - a player may pick either the A value or the B value. The particular tiles are [n, 0], [n-1, 1], ..., [2, n-2] and [1, n-1]. The sequence is the number of different final A:B counts. For example, with n=4, we can have final total [5, 3] = [4, ] + [, 1] + [, 2] + [1, ] = [, 0] + [3, ] + [2, ] + [, 3], so a(4) = 2^4 - 1 = 15. The largest and smallest final A+B counts are given by A077043 and A002620 respectively. - Jon Perry, Oct 24 2014
For n>=3, a(n) is also the number of maximal cliques in the (n+1)-triangular graph (the 4-triangular graph has a(3)=8 maximal cliques). - Andrew Howroyd, Jul 19 2017
a(n) is the number of binary words of length n matching the regular expression 1*0*1*0*. Coincidentally, A000124 counts binary words of the form 0*1*0*. See Alexandersson and Nabawanda for proof. - Per W. Alexandersson, May 15 2021
For n > 0, let the n-dimensional cube, {0,1}^n be provided with the Hamming distance, d. Given an element x in {0,1}^n, a(n) is the number of elements y in {0,1}^n such that d(x, y) <= 3. Example: n = 4. Let x = (0,0,0,0) be in {0,1}^4.
d(x,y) = 0: y in {(0,0,0,0)}.
d(x,y) = 1: y in {(1,0,0,0), (0,1,0,0), (0,0,1,0), (0,0,0,1)}.
d(x,y) = 2: y in {(1,1,0,0), (1,0,1,0), (1,0,0,1), (0,1,1,0), (0,1,0,1), (0,0,1,1)}.
d(x,y) = 3: y in {(1,1,1,0), (1,1,0,1), (1,0,1,1), (0,1,1,1)}.
All these y are at a distance <= 3 from (0,0,0,0), so a(4) = 15. (See Peter C. Heinig's formula). - Yosu Yurramendi, Dec 14 2021
For n >= 2, a(n) is the number of distinct least squares regression lines fitted to n points (j,y_j), 1 <= j <= n, where each y_j is 0 or 1. The number of distinct lines with exactly k 1's among y_1, ..., y_n is A077028(n,k). The number of distinct slopes is A123596(n). - Pontus von Brömssen, Mar 16 2024
The only powers of 2 in this sequence are a(0) = 1, a(1) = 2, a(2) = 4, a(3) = 8, and a(7) = 64. - Jianing Song, Jan 02 2025

Examples

			a(4)=15 because there are 15 compositions of 5 into four or fewer parts. a(6)=42 because the sum of the first four terms in the 6th row of Pascal's triangle is 1+6+15+20=42. - _Geoffrey Critzer_, Jan 23 2009
For n=5, (1, 3, 5, 7, 9, 11, 13, 17, 19, 21, 23, 25, 35) and their opposite are the 26 different sums obtained by summing 5,6,7,8,9 with any sign combination. - _Olivier Gérard_, Mar 22 2010
G.f. = 1 + 2*x + 4*x^2 + 8*x^3 + 15*x^4 + 26*x^5 + 42*x^6 + 64*x^7 + ... - _Michael Somos_, Jul 07 2022
		

References

  • V. I. Arnold (ed.), Arnold's Problems, Springer, 2004, comments on Problem 1990-11 (p. 75), pp. 503-510. Numbers N_3.
  • R. B. Banks, Slicing Pizzas, Racing Turtles and Further Adventures in Applied Mathematics, Princeton Univ. Press, 1999. See p. 27.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 80.
  • H. E. Dudeney, Amusements in Mathematics, Nelson, London, 1917, page 177.
  • 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).
  • T. H. Stickels, Mindstretching Puzzles. Sterling, NY, 1994 p. 85.
  • W. A. Whitworth, DCC Exercises in Choice and Chance, Stechert, NY, 1945, p. 30.
  • A. M. Yaglom and I. M. Yaglom: Challenging Mathematical Problems with Elementary Solutions. Vol. I. Combinatorial Analysis and Probability Theory. New York: Dover Publications, Inc., 1987, p. 13, #45 (First published: San Francisco: Holden-Day, Inc., 1964)

Crossrefs

Programs

Formula

a(n) = (n+1)*(n^2-n+6)/6 = (n^3 + 5*n + 6) / 6.
G.f.: (1 - 2*x + 2x^2)/(1-x)^4. - [Simon Plouffe in his 1992 dissertation.]
E.g.f.: (1 + x + x^2/2 + x^3/6)*exp(x).
a(n) = binomial(n,3) + binomial(n,2) + binomial(n,1) + binomial(n,0). - Peter C. Heinig (algorithms(AT)gmx.de), Oct 19 2006
Paraphrasing the previous comment: the sequence is the binomial transform of [1,1,1,1,0,0,0,...]. - Gary W. Adamson, Oct 23 2007
From Ilya Gutkovskiy, Jul 18 2016: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
a(n) = Sum_{k=0..n} A152947(k+1).
Inverse binomial transform of A134396.
Sum_{n>=0} a(n)/n! = 8*exp(1)/3. (End)
a(n) = -A283551(-n). - Michael Somos, Jul 07 2022
a(n) = A046127(n+1)/2 = A033547(n)/2 + 1. - Jianing Song, Jan 02 2025

Extensions

Minor typo in comments corrected by Mauro Fiorentini, Jan 02 2018

A287326 Triangle read by rows: T(n, k) = 6*k*(n-k) + 1; n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 7, 1, 1, 13, 13, 1, 1, 19, 25, 19, 1, 1, 25, 37, 37, 25, 1, 1, 31, 49, 55, 49, 31, 1, 1, 37, 61, 73, 73, 61, 37, 1, 1, 43, 73, 91, 97, 91, 73, 43, 1, 1, 49, 85, 109, 121, 121, 109, 85, 49, 1, 1, 55, 97, 127, 145, 151, 145, 127, 97, 55, 1, 1, 61, 109, 145, 169, 181, 181, 169, 145, 109, 61, 1
Offset: 0

Views

Author

Kolosov Petro, Aug 31 2017

Keywords

Comments

From Kolosov Petro, Apr 12 2020: (Start)
Let A(m, r) = A302971(m, r) / A304042(m, r).
Let L(m, n, k) = Sum_{r=0..m} A(m, r) * k^r * (n - k)^r.
Then T(n, k) = L(1, n, k), i.e T(n, k) is partial case of L(m, n, k) for m = 1.
T(n, k) is symmetric: T(n, k) = T(n, n-k). (End)

Examples

			Triangle begins:
  ----------------------------------------
  k=    0   1   2   3   4   5   6   7   8
  ----------------------------------------
  n=0:  1;
  n=1:  1,  1;
  n=2:  1,  7,  1;
  n=3:  1, 13, 13,  1;
  n=4:  1, 19, 25, 19,  1;
  n=5:  1, 25, 37, 37, 25,  1;
  n=6:  1, 31, 49, 55, 49, 31,  1;
  n=7:  1, 37, 61, 73, 73, 61, 37,  1;
  n=8:  1, 43, 73, 91, 97, 91, 73, 43,  1;
		

Crossrefs

Columns k=0..6 give A000012, A016921, A017533, A161705, A103214, A128470, A158065.
Column sums k=0..4 give A000027, A000567, A051866, A051872, A255185.
Row sums give A001093.
Various cases of L(m, n, k): This sequence (m=1), A300656(m=2), A300785(m=3). See comments for L(m, n, k).
Differences of cubes n^3 are T(A000124(n), 1).

Programs

  • GAP
    Flat(List([0..11],n->List([0..n],k->6*k*(n-k)+1))); # Muniru A Asiru, Oct 09 2018
    
  • Magma
    /* As triangle */ [[6*k*(n-k) + 1: k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Oct 26 2018
    
  • Maple
    T := (n, k) -> 6*k*(n-k) + 1:
    seq(seq(T(n, k), k=0..n), n=0..11); # Muniru A Asiru, Oct 09 2018
  • Mathematica
    T[n_, k_] := 6 k (n - k) + 1; Column[Table[T[n, k], {n, 0, 10}, {k, 0, n}], Center] (* Kolosov Petro, Jun 02 2019 *)
  • PARI
    t(n, k) = 6*k*(n-k)+1
    trianglerows(n) = for(x=0, n-1, for(y=0, x, print1(t(x, y), ", ")); print(""))
    /* Print initial 9 rows of triangle as follows */
    trianglerows(9) \\ Felix Fröhlich, Jan 09 2018
    
  • SageMath
    def A287326(n,k): return 6*k*(n-k) + 1
    flatten([[A287326(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Sep 25 2024

Formula

T(n, k) = 6*k*(n-k) + 1.
G.f. of column k: n^k*(1+(6*k-1)*n)/(1-n)^2.
G.f.: (1 - x - x*y + 7*x^2*y)/((1 - x)^2*(1 - x*y)^2). - Stefano Spezia, Oct 09 2018 [Adapted by Stefano Spezia, Sep 25 2024]
From Kolosov Petro, Jun 05 2019: (Start)
T(n, k) = 1/2 * T(A294317(n, k), k) + 1/2.
T(n+1, k) = 2*T(n, k) - T(n-1, k), for n >= k.
T(n, k) = 6*A077028(n, k) - 5.
T(2n, n) = A227776(n).
T(2n+1, n) = A003154(n+1).
T(2n+3, n) = A166873(n+1).
Sum_{k=0..n-1} T(n, k) = Sum_{k=1..n} T(n, k) = A000578(n).
Sum_{k=1..n-1} T(n, k) = A068601(n).
(n+1)^3 - n^3 = T(A000124(n), 1). (End)
Sum_{k=0..n} (-1)^k*T(n, k) = (-1/2)*(1 + (-1)^n)*A016969(floor(n/2) - 1). - G. C. Greubel, Sep 25 2024

A083906 Table read by rows: T(n, k) is the number of length n binary words with exactly k inversions.

Original entry on oeis.org

1, 2, 3, 1, 4, 2, 2, 5, 3, 4, 3, 1, 6, 4, 6, 6, 6, 2, 2, 7, 5, 8, 9, 11, 9, 7, 4, 3, 1, 8, 6, 10, 12, 16, 16, 18, 12, 12, 8, 6, 2, 2, 9, 7, 12, 15, 21, 23, 29, 27, 26, 23, 21, 15, 13, 7, 4, 3, 1, 10, 8, 14, 18, 26, 30, 40, 42, 48, 44, 46, 40, 40, 30, 26, 18, 14, 8, 6, 2, 2
Offset: 0

Views

Author

Alford Arnold, Jun 19 2003

Keywords

Comments

There are A033638(n) values in the n-th row, compliant with the order of the polynomial.
In the example for n=6 detailed below, the orders of [6, k]_q are 1, 6, 9, 10, 9, 6, 1 for k = 0..6,
the maximum order 10 defining the row length.
Note that 1 6 9 10 9 6 1 and related distributions are antidiagonals of A077028.
A083480 is a variation illustrating a relationship with numeric partitions, A000041.
The rows are formed by the nonzero entries of the columns of A049597.
If n is even the n-th row converges to n+1, n-1, n-4, ..., 19, 13, 7, 4, 3, 1 which is A029552 reversed, and if n is odd the sequence is twice A098613. - Michael Somos, Jun 25 2017

Examples

			When viewed as an array with A033638(r) entries per row, the table begins:
. 1 ............... : 1
. 2 ............... : 2
. 3 1 ............. : 3 + q = (1) + (1+q) + (1)
. 4 2 2 ........... : 4 + 2q + 2q^2 = 1 + (1+q+q^2) + (1+q+q^2) + 1
. 5 3 4 3 1 ....... : 5 + 3q + 4q^2 + 3q^3 + q^4
. 6 4 6 6 6 2 2
. 7 5 8 9 11 9 7 4 3 1
. 8 6 10 12 16 16 18 12 12 8 6 2 2
. 9 7 12 15 21 23 29 27 26 23 21 15 13 7 4 3 1
...
The second but last row is from the sum over 7 q-polynomials coefficients:
. 1 ....... : 1 = [6,0]_q
. 1 1 1 1 1 1 ....... : 1+q+q^2+q^3+q^4+q^5 = [6,1]_q
. 1 1 2 2 3 2 2 1 1 ....... : 1+q+2q^2+2q^3+3q^4+2q^5+2q^6+q^7+q^8 = [6,2]_q
. 1 1 2 3 3 3 3 2 1 1 ....... : 1+q+2q^2+3q^3+3q^4+3q^5+3q^6+2q^7+q^8+q^9 = [6,3]_q
. 1 1 2 2 3 2 2 1 1 ....... : 1+q+2q^2+2q^3+3q^4+2q^5+2q^6+q^7+q^8 = [6,4]_q
. 1 1 1 1 1 1 ....... : 1+q+q^2+q^3+q^4+q^5 = [6,5]_q
. 1 ....... : 1 = [6,6]_q
		

References

  • George E. Andrews, 'Theory of Partitions', 1976, page 242.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 100);
    qBinom:= func< n,k,x | n eq 0 or k eq 0 select 1 else (&*[(1-x^(n-j))/(1-x^(j+1)): j in [0..k-1]]) >;
    A083906:= func< n,k | Coefficient(R!((&+[qBinom(n,k,x): k in [0..n]]) ), k) >;
    [A083906(n,k): k in [0..Floor(n^2/4)], n in [0..12]]; // G. C. Greubel, Feb 13 2024
    
  • Maple
    QBinomial := proc(n,m,q) local i ; factor( mul((1-q^(n-i))/(1-q^(i+1)),i=0..m-1) ) ; expand(%) ; end:
    A083906 := proc(n,k) add( QBinomial(n,m,q),m=0..n ) ; coeftayl(%,q=0,k) ; end:
    for n from 0 to 10 do for k from 0 to A033638(n)-1 do printf("%d,",A083906(n,k)) ; od: od: # R. J. Mathar, May 28 2009
    T := proc(n, k) if n < 0 or k < 0 or k > floor(n^2/4) then return 0 fi;
    if n < 2 then return n + 1 fi; 2*T(n-1, k) - T(n-2, k) + T(n-2, k - n + 1) end:
    seq(print(seq(T(n, k), k = 0..floor((n/2)^2))), n = 0..8);  # Peter Luschny, Feb 16 2024
  • Mathematica
    Table[CoefficientList[Total[Table[FunctionExpand[QBinomial[n, k, q]], {k, 0, n}]],q], {n, 0, 10}] // Grid (* Geoffrey Critzer, May 14 2017 *)
  • PARI
    {T(n, k) = polcoeff(sum(m=0, n, prod(k=0, m-1, (x^n - x^k) / (x^m - x^k))), k)}; /* Michael Somos, Jun 25 2017 */
    
  • SageMath
    def T(n,k): # T = A083906
        if k<0 or k> (n^2//4): return 0
        elif n<2 : return n+1
        else: return 2*T(n-1, k) - T(n-2, k) + T(n-2, k-n+1)
    flatten([[T(n,k) for k in range(int(n^2//4)+1)] for n in range(13)]) # G. C. Greubel, Feb 13 2024

Formula

T(n, k) is the coefficient [q^k] of the Sum_{m=0..n} [n, m]_q over q-Binomial coefficients.
Row sums: Sum_{k=0..floor(n^2/4)} T(n,k) = 2^n.
For n >= k, T(n+1,k) = T(n, k) + A000041(k). - Geoffrey Critzer, Feb 12 2021
Sum_{k=0..floor(n^2/4)} (-1)^k*T(n, k) = A060546(n). - G. C. Greubel, Feb 13 2024
From Mikhail Kurkov, Feb 14 2024: (Start)
T(n, k) = 2*T(n-1, k) - T(n-2, k) + T(n-2, k - n + 1) for n >= 2 and 0 <= k <= floor(n^2/4).
Sum_{i=0..n} T(n-i, i) = A000041(n+1). Note that upper limit of the summation can be reduced to A083479(n) = (n+2) - ceiling(sqrt(4*n)).
Both results were proved (see MathOverflow link for details). (End)
From G. C. Greubel, Feb 17 2024: (Start)
T(n, floor(n^2/4)) = A000034(n).
Sum_{k=0..floor(n^2/4)} (-1)^k*T(n, k) = A016116(n+1).
Sum_{k=0..(n + 2) - ceiling(sqrt(4*n))} (-1)^k*T(n - k, k) = (-1)^n*A000025(n+1) = -A260460(n+1). (End)

Extensions

Edited by R. J. Mathar, May 28 2009
New name using a comment from Geoffrey Critzer by Peter Luschny, Feb 17 2024
Showing 1-10 of 42 results. Next