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

A155170
Triangle T(n, k) = k! - n! + (n-k)! read by rows.
3
1, 1, 1, 1, 0, 1, 1, -3, -3, 1, 1, -17, -20, -17, 1, 1, -95, -112, -112, -95, 1, 1, -599, -694, -708, -694, -599, 1, 1, -4319, -4918, -5010, -5010, -4918, -4319, 1, 1, -35279, -39598, -40194, -40272, -40194, -39598, -35279, 1, 1, -322559, -357838, -362154, -362736, -362736, -362154, -357838, -322559, 1
OFFSET
0,8
COMMENTS
Row sums are: 1, 2, 2, -4, -52, -412, -3292, -28492, -270412, -2810572, -31840972, ...
FORMULA
Sum_{k=0..n} T(n, m) = 2*A003422(n+1) - A000142(n+1). - R. J. Mathar, Jun 24 2011
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 0, 1;
1, -3, -3, 1;
1, -17, -20, -17, 1;
1, -95, -112, -112, -95, 1;
1, -599, -694, -708, -694, -599, 1;
1, -4319, -4918, -5010, -5010, -4918, -4319, 1;
1, -35279, -39598, -40194, -40272, -40194, -39598, -35279, 1;
1, -322559, -357838, -362154, -362736, -362736, -362154, -357838, -322559, 1;
MATHEMATICA
Table[k! -n! +(n-k)!, {n, 0, 12}, {k, 0, n}]//Flatten
PROG
(Sage) f=factorial; flatten([[f(n-k) -f(n) +f(k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Feb 07 2021
(Magma) F:=Factorial;; [F(n-k) -F(n) +F(k): k in [0..n], n in [0..12]]; // G. C. Greubel, Feb 07 2021
CROSSREFS
KEYWORD
sign,tabl,easy
AUTHOR
Roger L. Bagula, Jan 21 2009
STATUS
approved