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.

A123490 Triangle whose k-th column satisfies a(n) = (k+3)*a(n-1)-(k+2)*a(n-2).

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 8, 5, 2, 1, 16, 14, 6, 2, 1, 32, 41, 22, 7, 2, 1, 64, 122, 86, 32, 8, 2, 1, 128, 365, 342, 157, 44, 9, 2, 1, 256, 1094, 1366, 782, 260, 58, 10, 2, 1, 512, 3281, 5462, 3907, 1556, 401, 74, 11, 2, 1, 1024, 9842, 21846, 19532, 9332, 2802, 586, 92, 12, 2, 1
Offset: 0

Views

Author

Paul Barry, Oct 01 2006

Keywords

Examples

			Triangle begins
     1;
     2,    1;
     4,    2,     1;
     8,    5,     2,     1;
    16,   14,     6,     2,    1;
    32,   41,    22,     7,    2,    1;
    64,  122,    86,    32,    8,    2,   1;
   128,  365,   342,   157,   44,    9,   2,  1;
   256, 1094,  1366,   782,  260,   58,  10,  2,  1;
   512, 3281,  5462,  3907, 1556,  401,  74, 11,  2, 1;
  1024, 9842, 21846, 19532, 9332, 2802, 586, 92, 12, 2, 1;
		

Crossrefs

Columns include A000079, A007051, A047849, A047850, A047851.
Cf. A047848, A103439 (row sums), A123491 (diagonal sums).

Programs

  • Magma
    [((k+2)^(n-k) +k)/(k+1): k in [0..n], n in [0..12]]; // G. C. Greubel, Jun 15 2021
    
  • Mathematica
    Table[((k+2)^(n-k) +k)/(k+1), {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 14 2017 *)
  • PARI
    for(n=0, 10, for(k=0,n, print1(((k+2)^(n-k)+k)/(k+1), ", "))) \\ G. C. Greubel, Oct 14 2017
    
  • Sage
    flatten([[((k+2)^(n-k) +k)/(k+1) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 15 2021

Formula

Column k has g.f.: x^k*(1-x(1+k))/((1-x)*(1-x(2+k))).
T(n,k) = ((k+2)^(n-k) + k)/(k+1), for 0 <= k <= n.
Sum_{k=0..n} T(n, k) = A103439(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A123491(n).