OFFSET
0,6
LINKS
G. C. Greubel, Rows n = 0..100 of triangle, flattened
FORMULA
P(n,x) = 2*x*P(n-1,x) - (x^2 -x -4)*P(n-2,x).
From G. C. Greubel, Jul 09 2023: (Start)
T(n, k) = [x^(n-k)] ( ((x+sqrt(x+4))^n + (x-sqrt(x+4))^n)/2 ).
T(n, 1) = A000217(n-1), n >= 1.
T(n, n) = A199572(n).
Sum_{k=0..n} T(n, k) = A084057(n).
Sum_{k=0..n} 2^k*T(n, k) = A125818(n).
Sum_{k=0..n} (-1)^k*T(n, k) = A026150(n).
Sum_{k=0..n} (-2)^k*T(n, k) = A133343(n). (End)
EXAMPLE
First six rows:
1;
1, 0;
1, 1, 4;
1, 3, 12, 0;
1, 6, 25, 8, 16;
1, 10, 48, 40, 80, 0;
MATHEMATICA
P[n_, x_]:= P[n, x]= ((x+Sqrt[x+4])^n + (x-Sqrt[x+4])^n)/2;
T[n_, k_]:= Coefficient[Series[P[n, x], {x, 0, n-k+1}], x, n-k];
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Jan 08 2020; Jul 09 2023 *)
PROG
(Magma)
m:=12;
p:= func< n, x | ((x+Sqrt(x+4))^n + (x-Sqrt(x+4))^n)/2 >;
R<x>:=PowerSeriesRing(Rationals(), m+1);
T:= func< n, k | Coefficient(R!( p(n, x) ), n-k) >;
[T(n, k): k in [0..n], n in [0..m]]; // G. C. Greubel, Jul 09 2023
(SageMath)
def p(n, x): return ((x+sqrt(x+4))^n + (x-sqrt(x+4))^n)/2
def T(n, k):
P.<x> = PowerSeriesRing(QQ)
return P( p(n, x) ).list()[n-k]
flatten([[T(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 09 2023
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Jul 05 2009
STATUS
approved