login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A225433
Triangle T(n, k) = T(n, k-1) + (-1)^k*A142458(n+2, k+1) if k <= floor(n/2), otherwise T(n, n-k), with T(n, 0) = T(n, n) = 1, read by rows.
3
1, 1, 1, 1, -38, 1, 1, -165, -165, 1, 1, -676, 4806, -676, 1, 1, -2723, 44452, 44452, -2723, 1, 1, -10914, 362895, -1346780, 362895, -10914, 1, 1, -43681, 2780367, -20297327, -20297327, 2780367, -43681, 1, 1, -174752, 20554588, -263879264, 683233990, -263879264, 20554588, -174752, 1
OFFSET
0,5
FORMULA
From G. C. Greubel, Mar 19 2022: (Start)
T(n, k) = T(n, k-1) + (-1)^k*A142458(n+2, k+1) if k <= floor(n/2), otherwise T(n, n-k), with T(n, 0) = T(n, n) = 1.
T(n, n-k) = T(n, k). (End)
EXAMPLE
The triangle begins:
1;
1, 1;
1, -38, 1;
1, -165, -165, 1;
1, -676, 4806, -676, 1;
1, -2723, 44452, 44452, -2723, 1;
1, -10914, 362895, -1346780, 362895, -10914, 1;
1, -43681, 2780367, -20297327, -20297327, 2780367, -43681, 1;
MAPLE
See Maple program in A159041.
MATHEMATICA
(* First program *)
T[n_, k_, m_]:= T[n, k, m]= If[k==0 || k==n, 1, (m*(n+1) -m*(k+1) +1)*T[n-1, k- 1, m] + (m*(k+1) -(m-1))*T[n-1, k, m] ];
p[x_, n_]:= p[x, n]= Sum[x^i*If[i==Floor[n/2] && Mod[n, 2]==0, 0, If[i<= Floor[n/2], (-1)^i*T[n, i, 3], -(-1)^(n-i)*T[n, i, 3]]], {i, 0, n}]/(1-x);
Flatten[Table[CoefficientList[p[x, n], x], {n, 0, 12}]]
(* Second program *)
T[n_, k_, m_]:= T[n, k, m]= If[k==1 || k==n, 1, (m*n-m*k+1)*T[n-1, k-1, m] + (m*k-m+1)*T[n-1, k, m]];
A142458[n_, k_]:= T[n, k, 3];
A225433[n_, k_]:= A225433[n, k]= If[k==0 || k==n, 1, If[k<=Floor[n/2], A225433[n, k-1] +(-1)^k*A142458[n+2, k+1], A225433[n, n-k]]];
Table[A225433[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 19 2022 *)
PROG
(Sage)
@CachedFunction
def T(n, k, m):
if (k==1 or k==n): return 1
else: return (m*(n-k)+1)*T(n-1, k-1, m) + (m*k-m+1)*T(n-1, k, m)
def A142458(n, k): return T(n, k, 3)
@CachedFunction
def A225433(n, k):
if (k==0 or k==n): return 1
elif (k <= (n//2)): return A225433(n, k-1) + (-1)^k*A142458(n+2, k+1)
else: return A225433(n, n-k)
flatten([[A225433(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 19 2022
CROSSREFS
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula, May 07 2013
EXTENSIONS
Edited by N. J. A. Sloane, May 11 2013
Edited by G. C. Greubel, Mar 19 2022
STATUS
approved