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

A365673 Array A(n, k) read by ascending antidiagonals. Polygonal number weighted generalized Catalan sequences.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 4, 1, 1, 1, 4, 15, 8, 1, 1, 1, 5, 34, 105, 16, 1, 1, 1, 6, 61, 496, 945, 32, 1, 1, 1, 7, 96, 1385, 11056, 10395, 64, 1, 1, 1, 8, 139, 2976, 50521, 349504, 135135, 128, 1, 1, 1, 9, 190, 5473, 151416, 2702765, 14873104, 2027025, 256, 1
Offset: 0

Views

Author

Peter Luschny, Sep 30 2023

Keywords

Comments

Using polygonal numbers as weights, a recursion for triangles is defined, whose main diagonals represents a family of sequences, which include, among others, the powers of 2, the double factorial of odd numbers, the reduced tangent numbers, and the Euler numbers.
Apart from the edge cases k = 0 and k = n the recursion is T(n, k) = w(n, k) * T(n, k - 1) + T(n - 1, k). T(n, 0) = 1 and T(n, n) = T(n, n-1) if n > 0.
The weights w(n, k) identical to 1 yield the recursion of the Catalan triangle A009766 (with main diagonal the Catalan numbers). Here the polygonal numbers are used as weights in the form w(n, k) = p(s, n - k + 1), where the parameter s is the number of sides of the polygon and p(s, n) = ((s-2) * n^2 - (s-4) * n) / 2, see A317302.

Examples

			Array A(n, k) starts:                            (polygon|diagonal|triangle)
[0] 1, 1, 1,   1,     1,       1,         1, ...  A258837  A000012
[1] 1, 1, 2,   4,     8,      16,        32, ...  A080956  A011782
[2] 1, 1, 3,  15,   105,     945,     10395, ...  A001477  A001147  A001498
[3] 1, 1, 4,  34,   496,   11056,    349504, ...  A000217  A002105  A365674
[4] 1, 1, 5,  61,  1385,   50521,   2702765, ...  A000290  A000364  A060058
[5] 1, 1, 6,  96,  2976,  151416,  11449296, ...  A000326  A126151  A366138
[6] 1, 1, 7, 139,  5473,  357721,  34988647, ...  A000384  A126156  A365672
[7] 1, 1, 8, 190,  9080,  725320,  87067520, ...  A000566  A366150  A366149
[8] 1, 1, 9, 249, 14001, 1322001, 188106489, ...  A000567
           A054556                         A366137
		

Crossrefs

Cf. A009766, A366137 (central diagonal), A317302 (table of polygonal numbers).

Programs

  • Maple
    poly := (s, n) -> ((s - 2) * n^2 - (s - 4) * n) / 2:
    T := proc(s, n, k) option remember; if k = 0 then 1 else if k = n then T(s, n, k-1) else poly(s, n - k + 1) * T(s, n, k - 1) + T(s, n - 1, k) fi fi end:
    for n from 0 to 8 do A := (n, k) -> T(n, k, k): seq(A(n, k), k = 0..9) od;
    # Alternative, using continued fractions:
    A := proc(p, L) local CF, poly, k, m, P, ser;
       poly := (s, n) -> ((s - 2)*n^2 - (s - 4)*n)/2;
       CF := 1 + x;
       for k from 1 to L do
           m := L - k + 1;
           P := poly(p, m);
           CF := 1/(1 - P*x*CF)
       od;
       ser := series(CF, x, L);
       seq(coeff(ser, x, m), m = 0..L-1)
    end:
    for p from 0 to 8 do lprint(A(p, 8)) od;
  • Mathematica
    poly[s_, n_] := ((s - 2) * n^2 - (s - 4) * n) / 2;
    T[s_, n_, k_] := T[s, n, k] = If[k == 0, 1, If[k == n, T[s, n, k - 1], poly[s, n - k + 1] * T[s, n, k - 1] + T[s, n - 1, k]]];
    A[n_, k_] := T[n, k, k];
    Table[A[n - k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 27 2023, from first Maple program *)
  • PARI
    A(p, n) = {
           my(CF = 1 + x,
               poly(s, n) = ((s - 2)*n^2 - (s - 4)*n)/2,
               m, P
           );
           for(k = 1, n,
               m = n - k + 1;
               P = poly(p, m);
               CF = 1/(1 - P*x*CF)
            );
            Vec(CF + O(x^(n)))
    }
    for(p = 0, 8, print(A(p, 8)))
    \\  Michel Marcus and Peter Luschny, Oct 02 2023
  • Python
    from functools import cache
    @cache
    def T(s, n, k):
        if k == 0: return 1
        if k == n: return T(s, n, k - 1)
        p = (n - k + 1) * ((s - 2) * (n - k + 1) - (s - 4)) // 2
        return p * T(s, n, k - 1) + T(s, n - 1, k)
    def A(n, k): return T(n, k, k)
    for n in range(9): print([A(n, k) for k in range(9)])
    

A126150 Symmetric triangle, read by rows of 2*n+1 terms, similar to triangle A008301. Second term 4 times first term.

Original entry on oeis.org

1, 1, 4, 1, 6, 24, 36, 24, 6, 96, 384, 636, 744, 636, 384, 96, 2976, 11904, 20256, 26304, 28536, 26304, 20256, 11904, 2976, 151416, 605664, 1042056, 1407024, 1650456, 1736064, 1650456, 1407024, 1042056, 605664, 151416, 11449296, 45797184
Offset: 0

Views

Author

Paul D. Hanna, Dec 19 2006

Keywords

Examples

			Triangle begins:
  1;
  1, 4, 1;
  6, 24, 36, 24, 6;
  96, 384, 636, 744, 636, 384, 96;
  2976, 11904, 20256, 26304, 28536, 26304, 20256, 11904, 2976;
  151416, 605664, 1042056, 1407024, 1650456, 1736064, 1650456, 1407024, 1042056, 605664, 151416; ...
If we write the triangle like this:
  .......................... ....1;
  ................... ....1, ....4, ....1;
  ............ ....6, ...24, ...36, ...24, ....6;
  ..... ...96, ..384, ..636, ..744, ..636, ..384, ...96;
  .2976, 11904, 20256, 26304, 28536, 26304, 20256, 11904, .2976;
then the first term in each row is the sum of the previous row:
  2976 = 96 + 384 + 636 + 744 + 636 + 384 + 96
the next term is 4 times the first:
  11904 = 4*2976,
and the remaining terms in each row are obtained by the rule illustrated by:
  20256 = 2*11904 - 2976 - 6*96;
  26304 = 2*20256 - 11904 - 6*384;
  28536 = 2*26304 - 20256 - 6*636;
  26304 = 2*28536 - 26304 - 6*744;
  20256 = 2*26304 - 28536 - 6*636;
  11904 = 2*20256 - 26304 - 6*384;
  2976 = 2*11904 - 20256 - 6*96.
An alternate recurrence is illustrated by:
  11904 = 2976 + 3*(96 + 384 + 636 + 744 + 636 + 384 + 96);
  20256 = 11904 + 3*(384 + 636 + 744 + 636 + 384);
  26304 = 20256 + 3*(636 + 744 + 636);
  28536 = 26304 + 3*(744);
and then for k>n, T(n,k) = T(n,2n-k).
		

Crossrefs

Cf. A126151 (column 0); diagonals: A126152, A126153; A126154; variants: A008301, A125053, A126155.

Programs

  • PARI
    T(n,k)=local(p=3);if(2*n
    				
  • PARI
    /* Alternate Recurrence: */ T(n,k)=local(p=3);if(2*n
    				

Formula

Sum_{k=0..2n} (-1)^k*C(2n,k)*T(n,k) = (-6)^n.

A126152 Main diagonal of symmetric triangle A126150: a(n) = A126150(n,n).

Original entry on oeis.org

1, 4, 36, 744, 28536, 1736064, 152914176, 18372559104, 2885671339776, 573765893121024, 140835811776316416, 41820352964911908864, 14774712204104658671616, 6124078747943873540112384
Offset: 0

Views

Author

Paul D. Hanna, Dec 19 2006

Keywords

Crossrefs

Cf. A126150; A126151 (column 0), A126153 (diagonal).

Programs

  • PARI
    /* Continued fraction involving even-indexed pentagonal numbers: */
    {a(n)=local(CF=1+x*O(x),m,P); for(k=1, n,m=2*((n-k)\2+1);P=m*(3*m-1)/2-((n-k+1)%2); CF=1/(1-P*x*CF)); polcoeff(CF, n, x)}
    for(n=0,20,print1(a(n),","))

Formula

a(n) = Sum_{k=0..n} A130847(n,k)*3^k. - Philippe Deléham, Jul 22 2007
G.f.: 1/(1 - 4*x/(1 - 5*x/(1 - 21*x/(1 - 22*x/(1 - 50*x/(1 - 51*x/(1 - 91*x/(1 - 92*x/(1 -...))))))))), a continued fraction involving even-indexed pentagonal numbers A000326. - Paul D. Hanna, Feb 15 2012
a(n) ~ Gamma(1/3) * 2^(3*n+7/3) * 3^(n+3/2) * n^(2*n+7/6) / (exp(2*n) * Pi^(2*n+13/6)). - Vaclav Kotesovec, May 30 2015

A126153 Secondary diagonal of symmetric triangle A126150: a(n) = A126150(n+1,n).

Original entry on oeis.org

1, 24, 636, 26304, 1650456, 147705984, 17913816576, 2830553662464, 565108879101696, 139114514096953344, 41397845529582959616, 14649251145209922945024, 6079754611331559564097536
Offset: 0

Views

Author

Paul D. Hanna, Dec 19 2006

Keywords

Crossrefs

Cf. A126150; A126151 (column 0), A126152 (diagonal).

Formula

a(n) = A126152(n+1) - 3*A126152(n), where A126152 is the main diagonal of triangle A126150.

A087736 Triangle T(n,k) read by rows given by [0, 1, 3, 6, 10, 15, 21, ...] DELTA [1, 3, 6, 10, 15, 21, 28,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 1, 0, 1, 4, 0, 4, 23, 34, 0, 34, 249, 606, 496, 0, 496, 4354, 14181, 20434, 11056, 0, 11056, 112238, 450097, 894838, 885032, 349504, 0, 349504, 4008024, 18911670, 47136095, 65613780, 48468804, 14873104
Offset: 0

Views

Author

Philippe Deléham, Sep 30 2003, Jul 17 2007

Keywords

Examples

			Triangle begins:
1;
0, 1;
0, 1, 4;
0, 4, 23, 34;
0, 34, 249, 606, 496;
0, 496, 4354, 14181, 20434, 11056;
0, 11056, 112238, 450097, 894838, 885032, 349504;
0, 349504, 4008024, 18911670, 47136095, 65613780, 48468804, 14873104 ;...
		

Crossrefs

Diagonals give A002105: [1, 1, 4, 34, 496, ...] Row sums give A000364 : [1, 1, 5, 61, 1385, ...] Euler numbers.

Formula

Sum_{k, 0<=k<=n}T(n,k)*x^(n-k)=A000012(n), A011782(n), A001147(n), A002105(n+1), A000364(n), A126151(n), A126156(n) for n = -3,-2,-1,0,1,2,3 respectively .

Extensions

Corrected and edited. - Philippe Deléham, Nov 24 2008

A366138 Triangle read by rows. T(n, k) = A000326(n - k + 1) * T(n, k - 1) + T(n - 1, k) for 0 < k < n. T(n, 0) = 1 and T(n, n) = T(n, n - 1) if n > 0.

Original entry on oeis.org

1, 1, 1, 1, 6, 6, 1, 18, 96, 96, 1, 40, 576, 2976, 2976, 1, 75, 2226, 29688, 151416, 151416, 1, 126, 6636, 175680, 2259576, 11449296, 11449296, 1, 196, 16632, 757800, 18931176, 238623408, 1204566336, 1204566336
Offset: 0

Views

Author

Peter Luschny, Oct 01 2023

Keywords

Comments

This a weighted generalized Catalan triangle (A365673) with the pentagonal numbers as weights.

Examples

			Triangle T(n, k) starts:
[0] 1;
[1] 1,   1;
[2] 1,   6,     6;
[3] 1,  18,    96,     96;
[4] 1,  40,   576,   2976,     2976;
[5] 1,  75,  2226,  29688,   151416,    151416;
[6] 1, 126,  6636, 175680,  2259576,  11449296,   11449296;
[7] 1, 196, 16632, 757800, 18931176, 238623408, 1204566336, 1204566336;
		

Crossrefs

Cf. A000326, A126151 (main diagonal), A365673.

Programs

  • Maple
    T := proc(n, k) option remember; if k = 0 then 1 else if k = n then T(n, k-1)
    else (((n - k + 1)*(3*n - 3*k + 2))/2) * T(n, k - 1) + T(n - 1, k) fi fi end:
    seq(seq(T(n, k), k = 0..n), n = 0..8);
Showing 1-6 of 6 results.