OFFSET
0,5
LINKS
G. C. Greubel, Rows n = 0..50 of the triangle, flattened
FORMULA
T(n, k) = coefficients [x^k]( p(x,n) ), where p(x, n) = (x+1)^n for n < 2, otherwise (x+1)^n + x*((1+x)^(n-2) + 2^(n-2)*(1-x)^(n-1)*LerchPhi(x, 2-n, 1/2)).
T(n, n-k) = T(n, k).
T(n, 1) = A000027(n+2) - 2*[n=1]. - G. C. Greubel, Oct 26 2022
EXAMPLE
Triangle of coefficients begins as:
1;
1, 1;
1, 4, 1;
1, 5, 5, 1;
1, 6, 14, 6, 1;
1, 7, 36, 36, 7, 1;
1, 8, 95, 256, 95, 8, 1;
1, 9, 263, 1727, 1727, 263, 9, 1;
1, 10, 756, 10614, 23638, 10614, 756, 10, 1;
1, 11, 2222, 60762, 259884, 259884, 60762, 2222, 11, 1;
MATHEMATICA
p[x_, n_]:= If[n>=2, (x+1)^n + x*((1+x)^(n-2) + 2^(n-2)*(1-x)^(n-1)*LerchPhi[x, 2-n, 1/2]), (x+1)^n];
Table[CoefficientList[p[x, n], x], {n, 0, 10}]//Flatten
PROG
(Magma) // as a triangle
LerchPhi:= func< x, n, q | (&+[x^k/(k+q)^n: k in [0..100]]) >;
p:= func< n, x | n lt 2 select (x+1)^n else (x+1)^n + x*(1+x)^(n-2) + 2^(n-2)*x*(1-x)^(n-1)*LerchPhi(x, 2-n, 1/2) >;
R<x>:=PowerSeriesRing(Integers(), 30);
[Coefficients(R!( p(n, x) )): n in [0..12]]; // G. C. Greubel, Oct 26 2022
(SageMath)
def LerchPhi(x, n, q): return sum( x^k/(k+q)^n for k in range(100))
def p(n, x):
if (n<2): return (x+1)^n
else: return (x+1)^n + x*(1+x)^(n-2) + 2^(n-2)*x*(1-x)^(n-1)*LerchPhi(x, 2-n, 1/2)
flatten([[( p(n, x) ).series(x, n+1).list()[k] for k in range(n+1)] for n in (0..12)]) # G. C. Greubel, Oct 26 2022
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Nov 07 2008
EXTENSIONS
Edited by G. C. Greubel, Oct 26 2022
STATUS
approved