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

A309557 Number triangle with T(n,k) = 2 + 3*n - 2*k + 2*k*(n-k) for n >= 0, 0 <= k <= n.

Original entry on oeis.org

2, 5, 3, 8, 8, 4, 11, 13, 11, 5, 14, 18, 18, 14, 6, 17, 23, 25, 23, 17, 7, 20, 28, 32, 32, 28, 20, 8, 23, 33, 39, 41, 39, 33, 23, 9, 26, 38, 46, 50, 50, 46, 38, 26, 10, 29, 43, 53, 59, 61, 59, 53, 43, 29, 11, 32, 48, 60, 68, 72, 72, 68, 60, 48, 32, 12, 35, 53, 67, 77, 83, 85, 83, 77, 67, 53, 35, 13
Offset: 0

Views

Author

Philip K Hotchkiss, Aug 07 2019

Keywords

Comments

The rascal triangle (A077028) can be generated by South = (East*West+1)/North or South = East+West+1-North; this triangle can be generated by South = (East*West+1)/North, South = East+West+2-North.

Examples

			For row n=3: a(3,0)=11, a(3,1)=13, a(3,2)=11, a(3,3)=5, ...
For antidiagonal r=2: T(2,0)=4, T(2,1)=11, T(2,2)=18, ...
Triangle T begins:
              2
            5   3
          8   8   4
        11  13  11  5
      14  18  18  14  6
    17  23  25  23  17  7
  20  28  32  32  28  20  8
23  33  39  41  39  33  23  9
             ...
		

Crossrefs

Programs

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

Formula

By rows: a(n,k) = 2 + 3*n - 2*k + 2*k*(n-k) n >= 0, 0 <= k <= n.
By antidiagonals: T(r,k) = 2 + 3*k + r + 2*r*k, r,k >= 0.
G.f.: (x*(-1-4*y+y^2)-2*(1-4*y+y^2))/((-1+x)^2*(-1+y)^3). - Stefano Spezia, Sep 08 2019

A332790 Triangle read by rows: T(n,k) = 1 + 2*n + k + 5*k(n-k) for n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 3, 4, 5, 11, 7, 7, 18, 19, 10, 9, 25, 31, 27, 13, 11, 32, 43, 44, 35, 16, 13, 39, 55, 61, 57, 43, 19, 15, 46, 67, 78, 79, 70, 51, 22, 17, 53, 79, 95, 101, 97, 83, 59, 25, 19, 60, 91, 112, 123, 124, 115, 96, 67, 28, 21, 67, 103, 129, 145, 151, 147, 133, 109, 75, 31
Offset: 0

Views

Author

Philip K Hotchkiss, Mar 04 2020

Keywords

Examples

			From _Jon E. Schoenfield_, Mar 14 2020: (Start)
.
  n\k|  0    1    2    3    4    5    6    7    8    9   10
  ---+-----------------------------------------------------
   0 |  1
   1 |  3    4
   2 |  5   11    7
   3 |  7   18   19   10
   4 |  9   25   31   27   13
   5 | 11   32   43   44   35   16
   6 | 13   39   55   61   57   43   19
   7 | 15   46   67   78   79   70   51   22
   8 | 17   53   79   95  101   97   83   59   25
   9 | 19   60   91  112  123  124  115   96   67   28
  10 | 21   67  103  129  145  151  147  133  109   75   31
  ...
(End)
		

Crossrefs

Programs

  • Maple
    :=proc(n, k)
       if n<0 or k<0 or k>n then
           0;
       else
           1+2*n+k+5*k*(n-k);
       end if;
  • Mathematica
    T[n_, k_]:=1+2*n+k+5*k*(n-k); Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten

Formula

T(n,k) = 1 + 2*n + k + 5*k*(n-k), n >= 0, 0 <= k <= n.

A332963 Number triangle where T(2n,0)=T(2n,2n)=1, T(2n+1,0)=T(2n+1,2n+1)=2 for all n >= 0, and the interior numbers are defined recursively by T(n,k) = (T(n-1,k-1)*T(n-1,k)+1)/T(n-2,k-1) for n > 2, 0 < k <= n.

Original entry on oeis.org

1, 2, 2, 1, 5, 1, 2, 3, 3, 2, 1, 7, 2, 7, 1, 2, 4, 5, 5, 4, 2, 1, 9, 3, 13, 3, 9, 1, 2, 5, 7, 8, 8, 7, 5, 2, 1, 11, 4, 19, 5, 19, 4, 11, 1, 2, 6, 9, 11, 12, 12, 11, 9, 6, 2, 1, 13, 5, 25, 7, 29, 7, 25, 5, 13, 1, 2, 7, 11, 14, 16, 17, 17, 16, 14, 11, 7, 2
Offset: 0

Views

Author

Philip K Hotchkiss, Mar 04 2020

Keywords

Examples

			For row 3: a(3,0)=2, a(3,1)= 3, a(3,2)=3, a(3,3)=2.
For antidiagonal 3: T(3,0)=2, T(3,1)=7, T(3,2)=5, T(3,3)=13, ...
Triangle begins:
  1;
  2, 2;
  1, 5, 1;
  2, 3, 3, 2;
  1, 7, 2, 7, 1;
  2, 4, 5, 5, 4, 2;
  ...
		

Crossrefs

Programs

  • PARI
    T(n, k) = if ((n<0) || (nMichel Marcus, Mar 16 2020

Formula

By rows: a(2n,0)=a(2n,2n)=1, a(2n+1,0)=a(2n+1,2n+1)=2 for all n >= 0, while the interior numbers are defined recursively by a(n,k) = (a(n-1,k-1)*a(n-1,k)+1)/a(n-2,k-1) for n >= 2, 0 < k <= n.
By antidiagonals: T(0,2n)=T(2n,0)=1, T(0,2n+1)=T(2n+1,0)=2 for all n >= 0, while the interior numbers are defined recursively by T(r,k) = (T(r-1,k)*(Tr,k-1)+1)/T(r-1,k-1) for r,k > 0.

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

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 4, 4, 3, 1, 7, 7, 6, 4, 1, 11, 11, 10, 8, 5, 1, 16, 16, 15, 13, 10, 6, 1, 22, 22, 21, 19, 16, 12, 7, 1, 29, 29, 28, 26, 23, 19, 14, 8, 1, 37, 37, 36, 34, 31, 27, 22, 16, 9, 1, 46, 46, 45, 43, 40, 36, 31, 25, 18, 10, 1, 56, 56, 55, 53, 50, 46, 41, 35, 28, 20, 11, 1
Offset: 0

Views

Author

Werner Schulte, Nov 22 2019

Keywords

Comments

This triangle equals A309559 with reversed rows and supplemented main diagonal (all terms are 1).
There are two lower triangular matrices M and N so that the matrix product M * N equals T (seen as a matrix).
/ 1 \ / 1 \
| 0 1 | | 1 1 |
| 0 1 1 | | 1 1 1 |
M(n,k) = | 0 1 2 1 | N(n,k) = | 1 1 1 1 |
| 0 1 2 3 1 | | 1 1 1 1 1 |
| 0 1 2 3 4 1 | | 1 1 1 1 1 1 |
\ . . . . . . . / \ . . . . . . . /
The matrix product N * M equals the rascal triangle A077028 (seen as a matrix).

Examples

			The triangle T(n,k) starts:
n \ k :   0    1    2    3    4    5    6    7    8    9   10   11
==================================================================
   0  :   1
   1  :   1    1
   2  :   2    2    1
   3  :   4    4    3    1
   4  :   7    7    6    4    1
   5  :  11   11   10    8    5    1
   6  :  16   16   15   13   10    6    1
   7  :  22   22   21   19   16   12    7    1
   8  :  29   29   28   26   23   19   14    8    1
   9  :  37   37   36   34   31   27   22   16    9    1
  10  :  46   46   45   43   40   36   31   25   18   10    1
  11  :  56   56   55   53   50   46   41   35   28   20   11    1
etc.
		

Crossrefs

Row sums equal A116731(n+1).
Row sums apart from column 0 equal A081489.

Formula

O.g.f.: Sum_{n>=0, k=0..n} T(n,k) * x^k * t^n = ((t^2+(1-t)^2) * (1-x*t) + x * t^2 * (1-t)) / ((1-t)^3 * (1-x*t)^2).
G.f. of column k: Sum_{n>=k} T(n,k) * t^n = t^k * (t^2/(1-t)^3 + 1/(1-t) + k*t/(1-t)^2) for k >= 0.
T(n,k) = 1 + T(n-1,k) + T(n-1,k-1) - T(n-2,k-1) for 0 < k < n with initial values T(n,0) = (n*(n-1)+2)/2 and T(n,n) = 1 for n >= 0.
T(n,k) = (2 + T(n-1,k-1) * T(n-1,k+1)) / T(n-2,k) for 0 < k < n-1 with initial values given above and T(n,n-1) = n for n > 0.
Referring to the triangle M(n,k) (see comments), we get:
(1) Sum_{k=0..n} (k+1) * M(n,k) = A116731(n+1) for n >= 0;
(2) Sum_{k=1..n} k * M(n,k) = A081489(n) for n >= 1.
T(n,k) = T(n-1,k-1) + n-k for 0 < k <= n with initial values T(n,0) = (n*(n-1)+2)/2 for n >= 0.
T(n,k) = 2 * T(n-1,k-1) - T(n-2,k-2) for 1 < k <= n with initial values T(0,0) = 1 and T(n,0) = T(n,1) = (n*(n-1)+2)/2 for n > 0.
Showing 1-4 of 4 results.