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-13 of 13 results.

A131919 A002024 + A131821 - A000012.

Original entry on oeis.org

1, 3, 3, 5, 3, 5, 7, 4, 4, 7, 9, 5, 5, 5, 9, 11, 6, 6, 6, 6, 11, 13, 7, 7, 7, 7, 7, 13, 15, 8, 8, 8, 8, 8, 8, 15, 17, 9, 9, 9, 9, 9, 9, 9, 17, 19, 10, 10, 10, 10, 10, 10, 10, 10, 19
Offset: 0

Views

Author

Gary W. Adamson, Jul 28 2007

Keywords

Comments

Row sums = A028872: (1, 6, 13, 22, 33, 46, ...).

Examples

			First few rows of the triangle:
   1;
   3, 3;
   5, 3, 5;
   7, 4, 4, 7;
   9, 5, 5, 5, 9;
  11, 6, 6, 6, 6, 11;
  13, 7, 7, 7, 7,  7, 13;
  ...
		

Crossrefs

Formula

A002024 + A131821 - A000012 as infinite lower triangular matrices.

A131830 Triangle read by rows: T(n,0) = T(n,n) = n + 1 for n >= 0, and T(n,k) = binomial(n,k) for 1 <= k <= n - 1, n >= 2.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 3, 3, 4, 5, 4, 6, 4, 5, 6, 5, 10, 10, 5, 6, 7, 6, 15, 20, 15, 6, 7, 8, 7, 21, 35, 35, 21, 7, 8, 9, 8, 28, 56, 70, 56, 28, 8, 9, 10, 9, 36, 84, 126, 126, 84, 36, 9, 10, 11, 10, 45, 120, 210, 252, 210, 120, 45, 10, 11, 12, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 12
Offset: 0

Views

Author

Gary W. Adamson, Jul 20 2007

Keywords

Comments

Given Pascal's triangle, replace the two (1, 1, 1, ...) borders with (1, 2, 3, ...).

Examples

			First few rows of the triangle are:
  1;
  2, 2;
  3, 2,  3;
  4, 3,  3,  4;
  5, 4,  6,  4,  5;
  6, 5, 10, 10,  5, 6;
  7, 6, 15, 20, 15, 6, 7;
  ...
		

Crossrefs

Row sums: A100314.

Programs

  • Mathematica
    Flatten[Table[If[Or[k==n,k==0], n+1, Binomial[n, k]], {n, 0, 11}, {k, 0, n}]] (* Georg Fischer, Feb 18 2020 *)
  • Maxima
    T(n, k) := if k = 0 or k = n then n + 1 else binomial(n, k)$
    create_list(T(n, k), n, 0, 12, k, 0, n); /* Franck Maminirina Ramaharo, Dec 19 2018 */

Formula

T(n,k) = A131821(n,k) + A007318(n,k) - 1.
From Franck Maminirina Ramaharo, Dec 19 2018: (Start)
G.f.: (1 - (1 + x)*y - 2*x*y^2 + (3*x + 3*x^2)*y^3 - (x + x^2 + x^3)*y^4)/((1 - y)^2*(1 - x*y)^2*(1 - y - x*y)).
E.g.f.: y*exp(y) + (x*y + exp(y))*exp(x*y). (End)

Extensions

Edited by Franck Maminirina Ramaharo, Dec 19 2018
B-file corrected from a(1678) onwards by Georg Fischer, Feb 18 2020

A319840 Table read by antidiagonals: T(n, k) is the number of elements on the perimeter of an n X k matrix.

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 4, 6, 6, 4, 5, 8, 8, 8, 5, 6, 10, 10, 10, 10, 6, 7, 12, 12, 12, 12, 12, 7, 8, 14, 14, 14, 14, 14, 14, 8, 9, 16, 16, 16, 16, 16, 16, 16, 9, 10, 18, 18, 18, 18, 18, 18, 18, 18, 10, 11, 20, 20, 20, 20, 20, 20, 20, 20, 20, 11, 12, 22, 22, 22
Offset: 1

Views

Author

Stefano Spezia, Sep 29 2018

Keywords

Comments

The table T(n, k) can be indifferently read by ascending or descending antidiagonals.

Examples

			The table T starts in row n=1 with columns k >= 1 as:
   1   2   3   4   5   6   7   8   9  10 ...
   2   4   6   8  10  12  14  16  18  20 ...
   3   6   8  10  12  14  16  18  20  22 ...
   4   8  10  12  14  16  18  20  22  24 ...
   5  10  12  14  16  18  20  22  24  26 ...
   6  12  14  16  18  20  22  24  26  28 ...
   7  14  16  18  20  22  24  26  28  30 ...
   8  16  18  20  22  24  26  28  30  32 ...
   9  18  20  22  24  26  28  30  32  34 ...
  10  20  22  24  26  28  30  32  34  36 ...
  ...
The triangle X(n, k) begins
  n\k|   1   2   3   4   5   6   7   8   9  10
  ---+----------------------------------------
   1 |   1
   2 |   2   2
   3 |   3   4   3
   4 |   4   6   6   4
   5 |   5   8   8   8   5
   6 |   6  10  10  10  10   6
   7 |   7  12  12  12  12  12   7
   8 |   8  14  14  14  14  14  14   8
   9 |   9  16  16  16  16  16  16  16   9
  10 |  10  18  18  18  18  18  18  18  18  10
  ...
		

Crossrefs

Cf. A000027 (1st column/right diagonal of the triangle or 1st row/column of the table), A005843 (2nd row/column of the table, or 2nd column of the triangle), A008574 (main diagonal of the table), A005893 (row sum of the triangle).
Cf. A003991 (the number of elements in an n X k matrix).

Programs

  • Magma
    [[k lt 3 or n+1-k lt 3 select (n+1-k)*k else 2*n-2: k in [1..n]]: n in [1..10]]; // triangle output
    
  • Maple
    a := (n, k) -> (n+1-k)*k-(n-1-k)*(k-2)*(limit(Heaviside(min(n+1-k, k)-3+x), x = 0, right)): seq(seq(a(n, k), k = 1 .. n), n = 1 .. 20)
  • Mathematica
    Flatten[Table[(n + 1 - k) k-(n-1-k)*(k-2)Limit[HeavisideTheta[Min[n+1-k,k]-3+x], x->0, Direction->"FromAbove"  ],{n, 20}, {k, n}]] (* or *)
    f[n_] := Table[SeriesCoefficient[(x y - x^3 y^3)/((-1 + x)^2 (-1 + y)^2), {x, 0, i + 1 - j}, {y, 0, j}], {i, n, n}, {j, 1, n}]; Flatten[Array[f,20]]
  • PARI
    T(n, k) = if ((n+1-k<3) || (k<3), (n+1-k)*k, 2*n-2);
    tabl(nn) = for(i=1, nn, for(j=1, i, print1(T(i, j), ", ")); print);
    tabl(20) \\ triangle output

Formula

T(n, k) = n*k - (n - 2)*(k - 2)*H(min(n, k) - 3), where H(x) is the Heaviside step function, taking H(0) = 1.
G.f. as rectangular array: (x*y - x^3*y^3)/((-1 + x)^2*(-1 + y)^2).
X(n, k) = A131821(n, k)*A318274(n - 1, k)*A154325(n - 1, k). - Franck Maminirina Ramaharo, Nov 18 2018
Previous Showing 11-13 of 13 results.