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.

A173007 Triangle T(n,k) read by rows: coefficient [x^k] of the polynomial Product_{i=1..n} (x + q^i) in row n and q = 3.

This page as a plain text file.
%I A173007 #18 Feb 20 2021 23:12:16
%S A173007 1,3,1,27,12,1,729,351,39,1,59049,29160,3510,120,1,14348907,7144929,
%T A173007 882090,32670,363,1,10460353203,5223002148,650188539,24698520,297297,
%U A173007 1092,1,22876792454961,11433166050879,1427185336941,54665851779,674887059,2685501,3279,1
%N A173007 Triangle T(n,k) read by rows: coefficient [x^k] of the polynomial Product_{i=1..n} (x + q^i) in row n and q = 3.
%C A173007 Triangle T(n,k), read by rows, given by [3,6,27,72,243,702,2187,6480,...] DELTA [1,0,3,0,9,0,27,0,81,0,243,0,...] where DELTA is the operator defined in A084938. - _Philippe Deléham_, Oct 01 2011
%H A173007 G. C. Greubel, <a href="/A173007/b173007.txt">Rows n = 0..50 of the triangle, flattened</a>
%F A173007 p(x,n,q) = 1 if n=0, Product_{i=1..n} (x + q^i) otherwise, with q=3.
%F A173007 T(n,k) = 3^n*T(n-1,k) + T(n-1,k-1), T(0,0)=1. - _Philippe Deléham_, Oct 01 2011
%F A173007 Sum_{k=0..n} T(n, k, 4) = A290000(n+1). - _G. C. Greubel_, Feb 20 2021
%e A173007 Triangle begins as:
%e A173007             1;
%e A173007             3,          1;
%e A173007            27,         12,         1;
%e A173007           729,        351,        39,        1;
%e A173007         59049,      29160,      3510,      120,      1;
%e A173007      14348907,    7144929,    882090,    32670,    363,    1;
%e A173007   10460353203, 5223002148, 650188539, 24698520, 297297, 1092, 1;
%t A173007 (* First program *)
%t A173007 p[x_, n_, q_] = If[n==0, 1, Product[x + q^i, {i, 1, n}]];
%t A173007 Table[CoefficientList[p[x, n, 3], x], {n, 0, 10}] (* modified by _G. C. Greubel_, Feb 20 2021 *)
%t A173007 (* Second program *)
%t A173007 T[n_, k_, q_]:= If[k<0 || k>n, 0, If[k==n, 1, q^n*T[n-1,k,q] +T[n-1,k-1,q] ]];
%t A173007 Table[T[n,k,3], {n,0,10}, {k,0,n}]//Flatten (* _G. C. Greubel_, Feb 20 2021 *)
%o A173007 (Sage)
%o A173007 def T(n, k, q):
%o A173007     if (k<0 or k>n): return 0
%o A173007     elif (k==n): return 1
%o A173007     else: return q^n*T(n-1,k,q) + T(n-1,k-1,q)
%o A173007 flatten([[T(n,k,3) for k in (0..n)] for n in (0..10)]) # _G. C. Greubel_, Feb 20 2021
%o A173007 (Magma)
%o A173007 function T(n,k,q)
%o A173007   if k lt 0 or k gt n then return 0;
%o A173007   elif k eq n then return 1;
%o A173007   else return q^n*T(n-1,k,q) + T(n-1,k-1,q);
%o A173007   end if; return T; end function;
%o A173007 [T(n,k,3): k in [0..n], n in [0..10]]; // _G. C. Greubel_, Feb 20 2021
%Y A173007 Cf. A023531 (q=0), A007318 (q=1), A108084 (q=2), this sequence (q=3), A173008 (q=4).
%Y A173007 Cf. A203148, A290000.
%K A173007 nonn,tabl
%O A173007 0,2
%A A173007 _Roger L. Bagula_, Feb 07 2010
%E A173007 Edited by _G. C. Greubel_, Feb 20 2021