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

A309559 Triangle read by rows: T(n,k) = 1 + n + k^2/2 - k/2 + k*(n-k), n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 4, 6, 7, 7, 5, 8, 10, 11, 11, 6, 10, 13, 15, 16, 16, 7, 12, 16, 19, 21, 22, 22, 8, 14, 19, 23, 26, 28, 29, 29, 9, 16, 22, 27, 31, 34, 36, 37, 37, 10, 18, 25, 31, 36, 40, 43, 45, 46, 46, 11, 20, 28, 35, 41, 46, 50, 53, 55, 56, 56, 12, 22, 31, 39, 46, 52, 57, 61, 64, 66, 67, 67, 13, 24, 34, 43, 51, 58, 64, 69, 73, 76, 78, 79, 79
Offset: 0

Views

Author

Philip K Hotchkiss, Aug 07 2019

Keywords

Comments

The rascal triangle (A077028) can be generated by the rule South = (East*West+1)/North or South = East+West+1-North; this number triangle can also be generated by South = East+West+1-North, but there not by an equation of the form South = (East*West+d)/North.

Examples

			For row n=3: T(3,0)=4, T(3,1)=6, T(3,2)=6, T(3,3)=7.
Triangle T begins:
                  1
                2   2
              3   4   4
            4   6   7   7
          5   8  10  11  11
        6  10  13  15  16  16
      7  12  16  19  21  22  22
    8  14  19  23  26  28  29  29
  9  16  22  27  31  34  36  37  37
                 ...
		

Crossrefs

Programs

  • Maple
    T := proc(n, k)
       if n<0 or k<0 or k>n then
           0;
       else
           1+n+(1/2)*k^2-(1/2)k +k*(n-k);
       end if;
  • Mathematica
    T[n_,k_]:=1+n+(1/2)*k^2-(1/2)k +k*(n-k); Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten
    f[n_] := Table[SeriesCoefficient[(-1+(3-2*x)*y+(-1+x)*y^2)/((-1+x)^2*(-1+y)^3), {x, 0, i}, {y, 0, j}], {i, n, n}, {j, 0, n}]; Flatten[Array[f, 13,0]] (* Stefano Spezia, Sep 08 2019 *)

Formula

G.f.: (-1+(3-2*x)*y+(-1+x)*y^2)/((-1+x)^2*(-1+y)^3). - Stefano Spezia, Sep 08 2019

A053730 a(n) = 2^(n-2)*(n^2 - n + 4).

Original entry on oeis.org

1, 2, 6, 20, 64, 192, 544, 1472, 3840, 9728, 24064, 58368, 139264, 327680, 761856, 1753088, 3997696, 9043968, 20316160, 45350912, 100663296, 222298112, 488636416, 1069547520, 2332033024, 5066719232, 10972299264, 23689428992
Offset: 0

Views

Author

N. J. A. Sloane, Mar 24 2000

Keywords

Crossrefs

Cf. A053545.

Programs

  • GAP
    List([0..30], n-> 2^(n-2)*(n^2 -n +4)); # G. C. Greubel, Sep 06 2019
  • Magma
    I:=[1, 2, 6]; [n le 3 select I[n] else 6*Self(n-1)-12*Self(n-2) +8*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Apr 28 2012
    
  • Maple
    seq(2^(n-2)*(n^2 -n +4), n=0..30); # G. C. Greubel, Sep 06 2019
  • Mathematica
    CoefficientList[Series[(1-4*x+6*x^2)/(1-2*x)^3,{x,0,30}],x] (* Vincenzo Librandi, Apr 28 2012 *)
    LinearRecurrence[{6,-12,8}, {1,2,6}, 30] (* G. C. Greubel, Sep 06 2019 *)
  • PARI
    vector(30, n, 2^(n-3)*(n^2 -3*n +6)) \\ G. C. Greubel, Sep 06 2019
    
  • Sage
    [2^(n-2)*(n^2 -n +4) for n in (0..30)] # G. C. Greubel, Sep 06 2019
    

Formula

G.f.: (1-4*x+6*x^2)/(1-2*x)^3. - Colin Barker, Apr 01 2012
a(n) = 6*a(n-1) - 12*a(n-2) + 8*a(n-3). - Vincenzo Librandi, Apr 28 2012
a(n) = Sum_{k=0..n} binomial(n,k) * A077028(n,k), where A077028(n,k) = (n-k)*k + 1. - Paul D. Hanna, Oct 11 2015

A361682 Array read by descending antidiagonals. A(n, k) is the number of multiset combinations of {0, 1} whose type is defined in the comments. Also A(n, k) = hypergeom([-k, -2], [1], n).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 5, 1, 1, 10, 13, 7, 1, 1, 15, 25, 22, 9, 1, 1, 21, 41, 46, 33, 11, 1, 1, 28, 61, 79, 73, 46, 13, 1, 1, 36, 85, 121, 129, 106, 61, 15, 1, 1, 45, 113, 172, 201, 191, 145, 78, 17, 1, 1, 55, 145, 232, 289, 301, 265, 190, 97, 19, 1
Offset: 0

Views

Author

Peter Luschny, Mar 21 2023

Keywords

Comments

A combination of a multiset M is an unordered selection of k objects of M, where every object can appear at most as many times as it appears in M.
A(n, k) = Cardinality(Union_{j=0..k} Combination(MultiSet(1^[j*n], 0^[(k-j)*n]))), where MultiSet(r^[s], u^[v]) denotes a set that contains the element r with multiplicity s and the element u with multiplicity v; thus the multisets under consideration have n*k elements. Since the base set is {1, 0} the elements can be represented as binary strings. Applying the combination operator to the multisets results in a set of binary strings where '0' resp. '1' can appear at most j*n resp. (k-j)*n times. 'At most' means that they do not have to appear; in other words, the resulting set always includes the empty string ''.
In contrast to the procedure in A361045 we consider here the cardinality of the set union and not the sum of the individual cardinalities. If you want to exclude the empty string, you will find the sequences listed in A361521. The same construction with multiset permutations instead of multiset combinations results in A361043.
A different view can be taken if one considers the hypergeometric representation, hypergeom([-k, -m], [1], n). This is a family of arrays that includes the 'rascal' triangle: the all 1's array A000012 (m = 0), the rascal array A077028 (m = 1), this array (m = 2), and A361731 (m = 3).

Examples

			Array A(n, k) starts:
   [0] 1,  1,   1,    1,   1,   1,   1,    1, ...  A000012
   [1] 1,  3,   6,   10,  15,  21,  28,   36, ...  A000217
   [2] 1,  5,  13,   25,  41,  61,  85,  113, ...  A001844
   [3] 1,  7,  22,   46,  79, 121, 172,  232, ...  A038764
   [4] 1,  9,  33,   73, 129, 201, 289,  393, ...  A081585
   [5] 1, 11,  46,  106, 191, 301, 436,  596, ...  A081587
   [6] 1, 13,  61,  145, 265, 421, 613,  841, ...  A081589
   [7] 1, 15,  78,  190, 351, 561, 820, 1128, ...  A081591
   000012  | A028872 | A239325 |
       A005408    A100536   A069133
.
Triangle T(n, k) starts:
   [0] 1;
   [1] 1,  1;
   [2] 1,  3,   1;
   [3] 1,  6,   5,   1;
   [4] 1, 10,  13,   7,   1;
   [5] 1, 15,  25,  22,   9,   1;
   [6] 1, 21,  41,  46,  33,  11,   1;
   [7] 1, 28,  61,  79,  73,  46,  13,  1;
   [8] 1, 36,  85, 121, 129, 106,  61, 15,  1;
   [9] 1, 45, 113, 172, 201, 191, 145, 78, 17, 1.
.
Row 4 of the triangle:
A(0, 4) =  1 = card('').
A(1, 3) = 10 = card('', 0, 00, 000, 1, 10, 100, 11, 110, 111).
A(2, 2) = 13 = card('', 0, 00, 000, 0000, 1, 10, 100, 11, 110, 1100, 111, 1111).
A(3, 1) =  7 = card('', 0, 00, 000, 1, 11, 111).
A(4, 0) =  1 = card('').
		

Crossrefs

Cf. A239592 (main diagonal), A239331 (transposed array).

Programs

  • Maple
    A := (n, k) -> 1 + n*k*(4 + n*(k - 1))/2:
    for n from 0 to 7 do seq(A(n, k), k = 0..7) od;
    # Alternative:
    ogf := n -> (1 + (n - 1)*x)^2 / (1 - x)^3:
    ser := n -> series(ogf(n), x, 12):
    row := n -> seq(coeff(ser(n), x, k), k = 0..9):
    seq(print(row(n)), n = 0..7);
  • SageMath
    def A(m: int, steps: int) -> int:
        if m == 0: return 1
        size = m * steps
        cset = set()
        for a in range(0, size + 1, m):
            S = [str(int(i < a)) for i in range(size)]
            C = Combinations(S)
            cset.update("".join(i for i in c) for c in C)
        return len(cset)
    def ARow(n: int, size: int) -> list[int]:
        return [A(n, k) for k in range(size + 1)]
    for n in range(8): print(ARow(n, 7))

Formula

A(n, k) = 1 + n*k*(4 + n*(k - 1))/2.
T(n, k) = 1 + k*(n - k)*(4 + k*(n - k - 1))/2.
A(n, k) = [x^k] (1 + (n - 1)*x)^2 / (1 - x)^3.
A(n, k) = hypergeom([-k, -2], [1], n).
A(n, k) = A361521(n, k) + 1.

A374378 Iterated rascal triangle R2: T(n,k) = Sum_{m=0..2} binomial(n-k,m)*binomial(k,m).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1, 1, 6, 15, 19, 15, 6, 1, 1, 7, 21, 31, 31, 21, 7, 1, 1, 8, 28, 46, 53, 46, 28, 8, 1, 1, 9, 36, 64, 81, 81, 64, 36, 9, 1, 1, 10, 45, 85, 115, 126, 115, 85, 45, 10, 1, 1, 11, 55, 109, 155, 181, 181, 155, 109, 55, 11, 1
Offset: 0

Views

Author

Kolosov Petro, Jul 06 2024

Keywords

Comments

Triangle T(n,k) is the second triangle R2 among the rascal-family triangles; A374452 is triangle R3; A077028 is triangle R1.
Triangle T(n,k) equals Pascal's triangle A007318 through row 2i+1, i=2 (i.e., row 5).
Triangle T(n,k) equals Pascal's triangle A007318 through column i, i=2 (i.e., column 2).

Examples

			Triangle begins:
--------------------------------------------------
k=     0   1   2   3    4    5    6   7   8   9 10
--------------------------------------------------
n=0:   1
n=1:   1   1
n=2:   1   2   1
n=3:   1   3   3   1
n=4:   1   4   6   4    1
n=5:   1   5  10  10    5    1
n=6:   1   6  15  19   15    6    1
n=7:   1   7  21  31   31   21    7   1
n=8:   1   8  28  46   53   46   28   8   1
n=9:   1   9  36  64   81   81   64  36   9   1
n=10:  1  10  45  85  115  126  115  85  45  10  1
		

Crossrefs

Programs

  • Mathematica
    t[n_, k_]:=Sum[Binomial[n - k, m]*Binomial[k, m], {m, 0, 2}]; Column[Table[t[n, k], {n, 0, 12}, {k, 0, n}], Center]

Formula

T(n,k) = 1 + k*(n-k) + (1/4)*(k-1)*k*(n-k-1)*(n-k).
Row sums give A006261(n).
Diagonal T(n+1, n) gives A000027(n).
Diagonal T(n+2, n) gives A000217(n).
Diagonal T(n+3, n) gives A005448(n).
Diagonal T(n+4, n) gives A056108(n).
Diagonal T(n+5, n) gives A212656(n).
Column k=3 difference binomial(n+6, 3) - T(n+6, 3) gives C(n+3,3)=A007318(n+3,3).
Column k=4 difference binomial(n+7, 4) - T(n+7, 4) gives fifth column of (1,4)-Pascal triangle A095667.
G.f.: (1 + 3*x^4*y^2 - (2*x + 3*x^3*y)*(1 + y) + x^2*(1 + 5*y + y^2))/((1 - x)^3*(1 - x*y)^3). - Stefano Spezia, Jul 09 2024

A105851 Binomial transform triangle, read by rows.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 8, 4, 1, 16, 20, 12, 5, 1, 32, 48, 32, 16, 6, 1, 64, 112, 80, 44, 20, 7, 1, 128, 256, 192, 112, 56, 24, 8, 1, 256, 576, 448, 272, 144, 68, 28, 9, 1, 512, 1280, 1024, 640, 352, 176, 80, 32, 10, 1, 1024, 2816, 2304, 1472, 832, 432, 208, 92, 36, 11, 1
Offset: 0

Views

Author

Gary W. Adamson, Apr 23 2005

Keywords

Comments

Let P = Pascal's triangle as an infinite lower triangular matrix and A is the infinite array of arithmetic sequences as shown in A077028:
1, 1, 1, 1, 1, ...
1, 2, 3, 4, 5, ...
1, 3, 5, 7, 9, ...
1, 4, 7, 10, 13, ...
1, 5, 9, 13, 17, ...
Perform the operation P * A, getting a new array with each column being the binomial transform of an arithmetic sequence. Take antidiagonals of the new array, then by rows = the triangle of A105851.

Examples

			Column 3: 1, 5, 16, 44, 112, ... (A053220) is the binomial transform of 3k+1 (A016777: 1, 4, 7, ...).
Triangle begins:
     1;
     2,    1;
     4,    3,    1;
     8,    8,    4,    1;
    16,   20,   12,    5,   1;
    32,   48,   32,   16,   6,   1;
    64,  112,   80,   44,  20,   7,   1;
   128,  256,  192,  112,  56,  24,   8,  1;
   256,  576,  448,  272, 144,  68,  28,  9,  1;
   512, 1280, 1024,  640, 352, 176,  80, 32, 10,  1;
  1024, 2816, 2304, 1472, 832, 432, 208, 92, 36, 11, 1;
  ...
		

Crossrefs

Programs

  • Magma
    /* As triangle */ [[(2+k*(n-k))*2^(n-k-1): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Jul 26 2015
  • Maple
    seq(seq((2 + k*(n - k))*2^(n-k-1),k=0..n),n=0..10); # Peter Bala, Jul 26 2015
  • Mathematica
    t[n_, k_]:=(2 + k (n - k)) 2^(n - k - 1); Table[t[n - 1, k - 1], {n, 10}, {k, n}]//Flatten (* Vincenzo Librandi, Jul 26 2015 *)

Formula

n-th column of the triangle is the binomial transform of the arithmetic sequence (n*k + 1), (k = 0, 1, 2, ...).
From Peter Bala, Jul 26 2015: (Start)
T(n,k) = (2 + k*(n - k))*2^(n-k-1) for 0 <= k <= n.
O.g.f.: (1 - x*(2 + t) + 3*t*x^2)/((1 - 2*x)^2*(1 - t*x)^2) = 1 + (2 + t)*x + (4 + 3*t + t^2)*x^2 + ....
k-th column g.f.: (1 + (k - 2)*x)/(1 - 2*x)^2. Cf. A077028. (End)

Extensions

More terms from Philippe Deléham, Mar 31 2007

A128139 Triangle read by rows: matrix product A004736 * A128132.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 4, 5, 4, 1, 5, 7, 7, 5, 1, 6, 9, 10, 9, 6, 1, 7, 11, 13, 13, 11, 7, 1, 8, 13, 16, 17, 16, 13, 8, 1, 9, 15, 19, 21, 21, 19, 15, 9, 1, 10, 17, 22, 25, 26, 25, 22, 17, 10
Offset: 0

Views

Author

Gary W. Adamson, Feb 16 2007

Keywords

Comments

A077028 with the final term in each row omitted.
Interchanging the factors in the matrix product leads to A128140 = A128132 * A004736.
From Gary W. Adamson, Jul 01 2012: (Start)
Alternatively, antidiagonals of an array A(n,k) of sequences with arithmetic progressions as follows:
1, 2, 3, 4, 5, 6, ...
1, 3, 5, 7, 9, 11, ...
1, 4, 7, 10, 13, 16, ...
1, 5, 9, 13, 17, 21, ...
... (End)
From Gary W. Adamson, Jul 02 2012: (Start)
A summation generalization for Sum_{k>=1} 1/(A(n,k)*A(n,k+1)) (formulas copied from A002378, A000466, A085001, A003185):
1 = 1/(1)*(2) + 1/(2)*(3) + 1/(3)*(4) + ...
1 = 2/(1)*(3) + 2/(3)*(5) + 2/(5)*(7) + ...
1 = 3/(1)*(4) + 3/(4)*(7) + 3/(7)*(10) + ...
1 = 4/(1)*(5) + 4/(5)*(9) + 4/(9)*(13) + ...
...
As a summation of terms equating to a definite integral:
Integral_{0..1} dx/(1+x) = ... 1 - 1/2 + 1/3 - 1/4 + ... = log(2).
Integral_{0..1} dx/(1+x^2) = 1 - 1/3 + 1/5 - 1/7 + ... = Pi/4 (see A157142)
Integral_{0..1} dx/(1+x^3) = 1 - 1/4 + 1/7 - 1/10 + ... (see A016777)
Integral_{0..1} dx/(1+x^4) = 1 - 1/5 + 1/9 - 1/13 + ... (see A016813). (End)

Examples

			First few rows of the triangle:
  1;
  1,  2;
  1,  3,  3;
  1,  4,  5,  4;
  1,  5,  7,  7,  5;
  1,  6,  9, 10,  9,  6;
  1,  7, 11, 13, 13, 11,  7;
  1,  8, 13, 16, 17, 16, 13,  8;
  1,  9, 15, 19, 21, 21, 19, 15,  9;
  1, 10, 17, 22, 25, 26, 25, 22, 17, 10;
  ...
		

Crossrefs

Cf. A004736, A128132, A128140, A004006 (row sums).

Formula

A004736 * A128132 as infinite lower triangular matrices.
T(n,k) = k*(1+n-k)+1 = 1 + A094053(n+1,1+n-k). - R. J. Mathar, Jul 09 2012

A134398 Triangle read by rows: T(n, k) = (k-1)*(n-k) + binomial(n-1,k-1).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 10, 7, 1, 1, 9, 16, 16, 9, 1, 1, 11, 23, 29, 23, 11, 1, 1, 13, 31, 47, 47, 31, 13, 1, 1, 15, 40, 71, 86, 71, 40, 15, 1, 1, 17, 50, 102, 146, 146, 102, 50, 17, 1, 1, 19, 61, 141, 234, 277, 234, 141, 61, 19, 1
Offset: 1

Views

Author

Gary W. Adamson, Oct 23 2007

Keywords

Comments

Row sums = A116725: (1, 2, 5, 12, 26, 52, ...).

Examples

			First few rows of the triangle are:
  1;
  1,  1;
  1,  3,  1;
  1,  5,  5,  1;
  1,  7, 10,  7,  1;
  1,  9, 16, 16,  9,  1;
  1, 11, 23, 29, 23, 11,  1;
  1, 13, 31, 47, 47, 31, 13,  1;
  1, 15, 40, 71, 86, 71, 40, 15, 1;
...
		

Crossrefs

Programs

  • GAP
    Flat(List([1..10], n-> List([1..n], k-> (k-1)*(n-k) + Binomial(n-1,k-1) ))); # G. C. Greubel, Nov 29 2019
  • Magma
    [(k-1)*(n-k) + Binomial(n-1,k-1): k in [1..n], n in [1..10]]; // G. C. Greubel, Nov 29 2019
    
  • Maple
    seq(seq( (k-1)*(n-k) + binomial(n-1,k-1), k=1..n), n=1..10); # G. C. Greubel, Nov 29 2019
  • Mathematica
    p[x_, n_]:= p[x,n]= If[n==0, 1, (x+1)^n +Sum[(n-m)*m*x^m*(1 +x^(n-2*m)), {m, 1, n- 1}]/2]; Table[CoefficientList[FullSimplify[ExpandAll[p[x, n]]], x], {n, 0, 10}]//Flatten (* Roger L. Bagula, Nov 02 2008 *)
    Table[(k-1)*(n-k) + Binomial[n-1, k-1], {n,10}, {k,n}]//Flatten (* G. C. Greubel, Nov 29 2019 *)
  • PARI
    T(n,k) = (k-1)*(n-k) + binomial(n-1,k-1); \\ G. C. Greubel, Nov 29 2019
    
  • Sage
    [[(k-1)*(n-k) + binomial(n-1,k-1) for k in (1..n)] for n in (1..10)] # G. C. Greubel, Nov 29 2019
    

Formula

T(n, k) = A077028(n,k) + A007318(n,k) - 1.
Let p(x, n) = (1+x)^n + (1/2) * Sum_{j=1..n-1} (n-j)*j*x^j*(1 + x^(n - 2*j)) with p(x, 0) = 1, then T(n, k) = Coefficients(p(x,n)). - Roger L. Bagula, Nov 02 2008
T(n, k) = (k-1)*(n-k) + binomial(n-1,k-1). - G. C. Greubel, Nov 29 2019

Extensions

Extended by Roger L. Bagula, Nov 02 2008
Edited by G. C. Greubel, Nov 29 2019

A176270 Triangle T(n,m) = 1 + m*(m-n) read by rows, 0 <= m <= n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -2, -3, -2, 1, 1, -3, -5, -5, -3, 1, 1, -4, -7, -8, -7, -4, 1, 1, -5, -9, -11, -11, -9, -5, 1, 1, -6, -11, -14, -15, -14, -11, -6, 1, 1, -7, -13, -17, -19, -19, -17, -13, -7, 1, 1, -8, -15, -20, -23, -24, -23, -20, -15, -8, 1
Offset: 0

Views

Author

Roger L. Bagula, Apr 13 2010

Keywords

Comments

For GCD(-1 - m,-1 - n + m) = 1, smallest number that cannot be written as a*(-1 - m) + b*(-1 - n + m) with a and b in the nonnegative integers. - Thomas Anton, May 22 2019

Examples

			Triangle begins
  1;
  1,   1;
  1,   0,   1;
  1,  -1,  -1,   1;
  1,  -2,  -3,  -2,   1;
  1,  -3,  -5,  -5,  -3,   1;
  1,  -4,  -7,  -8,  -7,  -4,   1;
  1,  -5,  -9, -11, -11,  -9,  -5,   1;
  1,  -6, -11, -14, -15, -14, -11,  -6,   1;
  1,  -7, -13, -17, -19, -19, -17, -13,  -7,   1;
  1,  -8, -15, -20, -23, -24, -23, -20, -15,  -8,   1;
		

Crossrefs

Cf. A005586 (row sums), A077028.

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k-> k*(k-n)+1 ))); # G. C. Greubel, May 30 2019
  • Magma
    [[k*(k-n)+1: k in [0..n]]: n in [0..12]]; // G. C. Greubel, May 30 2019
    
  • Maple
    A176270 := proc(n,m)
            1+m*(m-n) ;
    end proc: # R. J. Mathar, May 03 2013
  • Mathematica
    Table[k*(k-n)+1, {n,0,12}, {k,0,n}]//Flatten (* modified by G. C. Greubel, May 30 2019 *)
  • PARI
    {T(n,k) = k*(k-n)+1}; \\ G. C. Greubel, May 30 2019
    
  • Sage
    [[k*(k-n)+1 for k in (0..n)] for n in (0..12)] # G. C. Greubel, May 30 2019
    

Formula

T(n,m) = binomial(n-m+1,2) + binomial(m+1,2) - binomial(n+1,2) + 1 = m^2 - n*m + 1.
T(n,m) = T(n,n-m).
T(n,m) = 2 - A077028(n,m) for 0 <= m <= n. - Werner Schulte, Nov 10 2020

Extensions

Edited by R. J. Mathar, May 03 2013

A176282 Triangle T(n,k) = 1 + A000330(n) - A000330(k) - A000330(n-k), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 9, 9, 1, 1, 16, 21, 16, 1, 1, 25, 37, 37, 25, 1, 1, 36, 57, 64, 57, 36, 1, 1, 49, 81, 97, 97, 81, 49, 1, 1, 64, 109, 136, 145, 136, 109, 64, 1, 1, 81, 141, 181, 201, 201, 181, 141, 81, 1, 1, 100, 177, 232, 265, 276, 265, 232, 177, 100, 1
Offset: 0

Views

Author

Roger L. Bagula, Apr 14 2010

Keywords

Comments

Not summing squares but summing integers implied by the definition (i.e., not using A000330 but A000217) gives A077028.
Row sums = {1, 2, 6, 20, 55, 126, 252, 456, 765, 1210, 1826, ...} = (n+1)*(n+2)*(n^2-2*n+3)/6.

Examples

			Triangle begins as:
  1;
  1,   1;
  1,   4,   1;
  1,   9,   9,   1;
  1,  16,  21,  16,   1;
  1,  25,  37,  37,  25,   1;
  1,  36,  57,  64,  57,  36,   1;
  1,  49,  81,  97,  97,  81,  49,   1;
  1,  64, 109, 136, 145, 136, 109,  64,   1;
  1,  81, 141, 181, 201, 201, 181, 141,  81,   1;
  1, 100, 177, 232, 265, 276, 265, 232, 177, 100, 1;
		

Crossrefs

Cf. A077028.

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k-> 1 + k*(n+1)*(n-k) ))); # G. C. Greubel, Nov 24 2019
  • Magma
    [1 + k*(n+1)*(n-k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 24 2019
    
  • Maple
    seq(seq(1 + k*(n+1)*(n-k), k=0..n), n=0..12); # G. C. Greubel, Nov 24 2019
  • Mathematica
    (* Set of sequences q=1..10. This sequence is q=2. *)
    f[n_, k_, q_]:= f[n, k, q] = 1 + Sum[i^q, {i,0,n}] - Sum[i^q, {i,0,k}] - Sum[i^q, {i,0,n-k}]; Table[Flatten[Table[f[n, k, q], {n,0,12}, {k,0,n}]], {q,1,10}]
    (* Second program *)
    Table[1 + k*(n+1)*(n-k), {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Nov 24 2019 *)
  • PARI
    T(n,k) = 1 + k*(n+1)*(n-k); \\ G. C. Greubel, Nov 24 2019
    
  • Sage
    [[1 + k*(n+1)*(n-k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 24 2019
    

Formula

T(n,k) = T(n,n-k).
T(n,k) = 1 + k*(n+1)*(n-k). - G. C. Greubel, Nov 24 2019

Extensions

Edited by R. J. Mathar, May 03 2013

A275490 Square array of 5D pyramidal numbers, read by antidiagonals.

Original entry on oeis.org

1, 1, 5, 1, 6, 15, 1, 7, 21, 35, 1, 8, 27, 56, 70, 1, 9, 33, 77, 126, 126, 1, 10, 39, 98, 182, 252, 210, 1, 11, 45, 119, 238, 378, 462, 330, 1, 12, 51, 140, 294, 504, 714, 792, 495, 1, 13, 57, 161, 350, 630, 966, 1254, 1287, 715, 1, 14, 63, 182, 406, 756, 1218, 1716, 2079, 2002, 1001
Offset: 2

Views

Author

R. J. Mathar, Jul 30 2016

Keywords

Comments

Let F(r,n,d) = binomial(r+d-2,d-1)* ((r-1)*(n-2)+d) /d be the d-dimensional pyramidal numbers. Then A(n,k) = F(k,n,5).
Sum of the n-th antidiagonal is binomial(n+4,7) + binomial(n+4,5) = A055797(n-1). - Mathew Englander, Oct 27 2020

Examples

			The array starts in rows n>=2 and columns k>=1 as
   1    5   15   35   70  126  210  330  495   715  1001  1365  1820
   1    6   21   56  126  252  462  792 1287  2002  3003  4368  6188
   1    7   27   77  182  378  714 1254 2079  3289  5005  7371 10556
   1    8   33   98  238  504  966 1716 2871  4576  7007 10374 14924
   1    9   39  119  294  630 1218 2178 3663  5863  9009 13377 19292
   1   10   45  140  350  756 1470 2640 4455  7150 11011 16380 23660
   1   11   51  161  406  882 1722 3102 5247  8437 13013 19383 28028
   1   12   57  182  462 1008 1974 3564 6039  9724 15015 22386 32396
   1   13   63  203  518 1134 2226 4026 6831 11011 17017 25389 36764
		

Crossrefs

Cf. Row sums of A080852 (4D), A080851 (3D), A057145 (2D), A077028 (1D).
Cf. A055797.

Programs

  • Mathematica
    Table[Binomial[k + 3, 4] + (# - 2)*Binomial[k + 3, 5] &[m - k + 1], {m, 2, 12}, {k, m - 1}] // Flatten (* Michael De Vlieger, Nov 05 2020 *)

Formula

A(n+2,k) = Sum_{j=0..k-1} A080852(n,j).
A(n,k) = binomial(k+3,4) + (n-2)*binomial(k+3,5). - Mathew Englander, Oct 27 2020
Previous Showing 21-30 of 42 results. Next