OFFSET
0,5
REFERENCES
Douglas C. Montgomery and Lynwood A. Johnson, Forecasting and Time Series Analysis, McGraw-Hill, New York, 1976, page 91.
LINKS
G. C. Greubel, Rows n = 0..50 of the triangle, flattened
FORMULA
T(n, k) = 2*A123125(n-1, k), with T(0, 0) = T(1, 0) = 1, otherwise T(n, 0) = T(n, n) = -1.
Sum_{k=0..n} T(n, k) = 2*033312(n), for n >= 1, otherwise 1 (n=0).
From G. C. Greubel, Sep 15 2024: (Start)
T(n, k) = 2*A008292(n, k) for n >= 2, 1 <= k <= n-1, with T(n, 0) = T(n, n) = -1, T(0, 0) = T(1, 0) = 1.
T(n, n-k) = T(n, k) for n >= 2. (End)
EXAMPLE
Triangle begins as:
1;
1, -1;
-1, 2, -1;
-1, 2, 2, -1;
-1, 2, 8, 2, -1;
-1, 2, 22, 22, 2, -1;
-1, 2, 52, 132, 52, 2, -1;
-1, 2, 114, 604, 604, 114, 2, -1;
-1, 2, 240, 2382, 4832, 2382, 240, 2, -1;
-1, 2, 494, 8586, 31238, 31238, 8586, 494, 2, -1;
-1, 2, 1004, 29216, 176468, 312380, 176468, 29216, 1004, 2, -1;
MATHEMATICA
(* First program *)
f[x_, n_]:= f[x, n]= (1-x)^(n+1)*Sum[k^n*x^k, {k, 0, Infinity}];
Table[Simplify[f[x, n]], {n, 0, 10}];
Join[{{1}}, Table[Join[CoefficientList[2*f[x, n] -1, x], {-1}], {n, 0, 10}]]//Flatten
(* Second program *)
Eulerian[n_, k_]:= Sum[(-1)^j*(k-j)^n*Binomial[n+1, j], {j, 0, k}]; (* A008292 *)
A141591[n_, k_]:= If[k==0 || k==n, -1, 2*Eulerian[n-1, k]] +2*Boole[n==0 || n ==1 && k==0];
Table[A141591[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Sep 15 2024 *)
PROG
(Magma)
Eulerian:= func< n, k | (&+[(-1)^j*Binomial(n+1, j)*(k-j)^n: j in [0..k]]) >; // A008292
function A141591(n, k)
if n eq 0 then return 1;
elif k eq 0 and n eq 1 then return 1;
elif k eq 0 or k eq n then return -1;
else return 2*Eulerian(n-1, k);
end if;
end function;
[A141591(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Sep 15 2024
(SageMath)
@CachedFunction
def A008292(n, k): return sum((-1)^j*binomial(n+1, j)*(k-j)^n for j in range(k+1))
def A141591(n, k):
if (k==0 and n==0): return 1
elif (k==0 and n==1): return 1
elif (k==0 or k==n): return -1
else: return 2*A008292(n-1, k)
flatten([[A141591(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Sep 15 2024
CROSSREFS
KEYWORD
tabl,sign
AUTHOR
Roger L. Bagula and Gary W. Adamson, Aug 20 2008
EXTENSIONS
Edited and new name by G. C. Greubel, Sep 15 2024
STATUS
approved