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.

A156222 Triangle T(n, k, q) = q^k*Q(k, n, q), with T(0, 0, q) = -2, where Q(k, n, q) = (1/q)*( -Q(k-1, n, q) + (1+q)*p(q, k-1)^n), Q(k, 0, q) = -q*(1+q)^n, p(q, n) = Product_{j=1..n} ( (1-q^k)/(1-q) ), and q = 2, read by rows.

Original entry on oeis.org

-2, -6, 9, -18, 21, -15, -54, 57, -51, 375, -162, 165, -159, 1131, 4666413, -486, 489, -483, 3399, 98015025, 148865383434975, -1458, 1461, -1455, 10203, 2058376701, 46892624598373299, 83234757492356072395126701
Offset: 0

Views

Author

Roger L. Bagula, Feb 06 2009

Keywords

Examples

			Triangle begins as:
    -2;
    -6,   9;
   -18,  21,  -15;
   -54,  57,  -51,  375;
  -162, 165, -159, 1131,  4666413;
  -486, 489, -483, 3399, 98015025, 148865383434975;
		

Crossrefs

Cf. A156220.

Programs

  • Mathematica
    Q[k_, n_, q_]:= Q[k, n, q]= If[n==0, 1, If[k==0, -q*(1+q)^n, (1/q)*( -Q[k-1, n, q] + (1+q)*(-1)^(n*(k-1))*QPochhammer[q,q,k-1]^n ) ]];
    T[n_, k_, q_]:= If[n==0, -2, 2^k*Q[k, n, q]];
    Table[T[n, k, 2], {n,0,10}, {k,0,n}]//Flatten (* modified by G. C. Greubel, Jan 01 2022 *)
  • Sage
    from sage.combinat.q_analogues import q_pochhammer
    @CachedFunction
    def Q(k,n,q):
        if (n==0): return 1
        elif (k==0): return -q*(q+1)^n
        else: return (1/q)*(-Q(k-1,n,q) + (1+q)*((-1)^(k-1)*q_pochhammer(k-1,q,q))^n)
    def T(n,k,q): return -2 if (n==0) else q^k*Q(k,n,q)
    flatten([[T(n,k,2) for k in (0..n)] for n in (0..10)]) # G. C. Greubel, Jan 01 2022

Formula

T(n, k, q) = q^k*Q(k, n, q), with T(0, 0, q) = -2, where Q(k, n, q) = (1/q)*( -Q(k-1, n, q) + (1+q)*p(q, k-1)^n), Q(k, 0, q) = -q*(1+q)^n, p(q, n) = Product_{j=1..n} ( (1-q^k)/(1-q) ), and q = 2.

Extensions

Edited by G. C. Greubel, Jan 01 2022