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”).

A225372
Triangle read by rows: T(n,k) (1 <= k <= n) given by T(n, 1) = T(n,n) = 1, otherwise T(n, k) = (m*n-m*k+1)*T(n-1,k-1) + (m*k-m+1)*T(n-1,k), where m = -2.
6
1, 1, 1, 1, -2, 1, 1, -1, -1, 1, 1, -4, 6, -4, 1, 1, -3, 2, 2, -3, 1, 1, -6, 15, -20, 15, -6, 1, 1, -5, 9, -5, -5, 9, -5, 1, 1, -8, 28, -56, 70, -56, 28, -8, 1, 1, -7, 20, -28, 14, 14, -28, 20, -7, 1, 1, -10, 45, -120, 210, -252, 210, -120, 45, -10, 1
OFFSET
1,5
FORMULA
T(n, k) = (m*n-m*k+1)*T(n-1,k-1) + (m*k-m+1)*T(n-1,k), with T(n, 1) = T(n, n) = 1, and m = -2.
Sum_{k=1..n} T(n, k) = A130706(n-1). - G. C. Greubel, Mar 17 2022
EXAMPLE
Triangle begins:
1;
1, 1;
1, -2, 1;
1, -1, -1, 1;
1, -4, 6, -4, 1;
1, -3, 2, 2, -3, 1;
1, -6, 15, -20, 15, -6, 1;
1, -5, 9, -5, -5, 9, -5, 1;
1, -8, 28, -56, 70, -56, 28, -8, 1;
1, -7, 20, -28, 14, 14, -28, 20, -7, 1;
MAPLE
T:=proc(n, k, l) option remember;
if (n=1 or k=1 or k=n) then 1 else
(l*n-l*k+1)*T(n-1, k-1, l)+(l*k-l+1)*T(n-1, k, l); fi; end;
for n from 1 to 14 do lprint([seq(T(n, k, -2), k=1..n)]); od;
MATHEMATICA
T[n_, k_, l_] := T[n, k, l] = If[n == 1 || k == 1 || k == n, 1, (l*n-l*k+1)*T[n-1, k-1, l]+(l*k-l+1)*T[n-1, k, l]]; Table[T[n, k, -2], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 09 2014, translated from Maple *)
PROG
(Magma)
function T(n, k, m)
if k eq 1 or k eq n then return 1;
else return (m*(n-k)+1)*T(n-1, k-1, m) + (m*k-m+1)*T(n-1, k, m);
end if; return T;
end function;
A225372:= func< n, k | T(n, k, -2) >;
[A225372(n, k): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 17 2022
(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 A225372(n, k): return T(n, k, -2)
flatten([[ A225372(n, k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Mar 17 2022
CROSSREFS
For m = ...,-2,-1,0,1,2,3,4,5,6,7,8, ... we get ..., A225372, A144431, A007318, A008292, A060187, A142458, A142459, A142560, A142561, A142562, A167884, ...
Cf. A130706 (row sums).
Sequence in context: A082907 A146532 A305720 * A184879 A373201 A119335
KEYWORD
sign,tabl
AUTHOR
STATUS
approved

  NODES
orte 1
see 1
Story 1