login
A225532
Triangle T(n, k) = abs(A225483(n/2, k)) if (n mod 2 = 0), otherwise abs(A225482((n-1)/2, k) - A225483((n-1)/2, k-1)), read by rows.
1
1, 1, 1, 1, 26, 1, 1, 27, 27, 1, 1, 120, 1192, 120, 1, 1, 121, 1312, 1312, 121, 1, 1, 502, 14609, 88736, 14609, 502, 1, 1, 503, 15111, 103345, 103345, 15111, 503, 1, 1, 2036, 152638, 2205524, 9890752, 2205524, 152638, 2036, 1, 1, 2037, 154674, 2358162, 12096276, 12096276, 2358162, 154674, 2037, 1
OFFSET
0,5
FORMULA
From G. C. Greubel, Mar 29 2022: (Start)
T(n, k) = abs(A225483(n/2, k)) if (n mod 2 = 0), otherwise abs(A225482((n-1)/2, k) - A225483((n-1)/2, k-1)).
T(n, n-k) = T(n, k). (End)
EXAMPLE
Triangle begins:
1;
1, 1;
1, 26, 1;
1, 27, 27, 1;
1, 120, 1192, 120, 1;
1, 121, 1312, 1312, 121, 1;
1, 502, 14609, 88736, 14609, 502, 1;
1, 503, 15111, 103345, 103345, 15111, 503, 1;
MATHEMATICA
(* First program *)
Needs["Combinatorica`"];
p[n_, x_]:= p[n, x]= Sum[If[i==Floor[n/2] && Mod[n, 2]==0, 0, If[i<=Floor[n/2], (-1)^i*Eulerian[n+1, i]*x^i, (-1)^(n-i+1)*Eulerian[n+1, i]*x^i]], {i, 0, n}]/(1 - x^2);
q[n_, x_]= If[Mod[n, 2]==0, (1-x)*p[n/2, x], p[(n+1)/2, x]];
Table[Abs[CoefficientList[q[(4*n +(-1)^n +5)/2, x], x]], {n, 0, 12}]//Flatten (* modified by G. C. Greubel, Mar 29 2022 *)
(* Second program *)
A008292[n_, k_]:= A008292[n, k]= Sum[(-1)^j*(k-j)^n*Binomial[n+1, j], {j, 0, k}];
f[n_, k_]:= f[n, k]= If[k==0 || k==n, 1, If[k<=Floor[n/2], f[n, k-1] + (-1)^k*A008292[n+2, k+1], f[n, n-k]]]; (* f=A159041 *)
A225483[n_, k_]:= Sum[(-1)^(k-j)*f[2*n+1, j], {j, 0, k}];
T[n_, k_]:= If[Mod[n, 2]==0, A225483[n/2, k], A225483[(n-1)/2, k] - A225483[(n - 1)/2, k-1] ]//Abs;
Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 29 2022 *)
PROG
(Sage)
def A008292(n, k): return sum( (-1)^j*(k-j)^n*binomial(n+1, j) for j in (0..k) )
@CachedFunction
def f(n, k): # A159041
if (k==0 or k==n): return 1
elif (k <= (n//2)): return f(n, k-1) + (-1)^k*A008292(n+2, k+1)
else: return f(n, n-k)
def A225483(n, k): return sum( (-1)^(k-j)*f(2*n+1, j) for j in (0..k) )
@CachedFunction
def A225532(n, k):
if (n%2==0): return abs(A225483(n/2, k))
else: return abs( A225483((n-1)/2, k) - A225483((n-1)/2, k-1) )
flatten([[A225532(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 29 2022
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, May 09 2013
EXTENSIONS
Edited by G. C. Greubel, Mar 29 2022
STATUS
approved