OFFSET
1,7
COMMENTS
LINKS
G. C. Greubel, Antidiagonal rows n = 1..100, flattened
EXAMPLE
Northwest corner:
1 0 -1 -2 -3
0 1 0 -1 -2
-1 0 1 0 -1
2 -1 0 1 0
MATHEMATICA
(* First program *)
f[i_, j_] := Min[i - j + 1, j - i + 1];
m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
TableForm[m[6]] (* 6 X 6 principal submatrix *)
Flatten[Table[f[i, n + 1 - i],
{n, 1, 12}, {i, 1, n}]] (* A203994 *)
p[n_] := CharacteristicPolynomial[m[n], x];
c[n_] := CoefficientList[p[n], x]
TableForm[Flatten[Table[p[n], {n, 1, 10}]]]
Table[c[n], {n, 1, 12}]
Flatten[%] (* A203995 *)
TableForm[Table[c[n], {n, 1, 10}]]
(* Second program *)
Table[Min[2*k-n, n-2*k+2], {n, 15}, {k, n}]//Flatten (* G. C. Greubel, Jul 23 2019 *)
PROG
(PARI) for(n=1, 15, for(k=1, n, print1(min(2*k-n, n-2*k+2), ", "))) \\ G. C. Greubel, Jul 23 2019
(Magma) [Min(2*k-n, n-2*k+2): k in [1..n], n in [1..15]]; // G. C. Greubel, Jul 23 2019
(Sage) [[min(2*k-n, n-2*k+2) for k in (1..n)] for n in (1..15)] # G. C. Greubel, Jul 23 2019
(GAP) Flat(List([1..15], n-> List([1..n], k-> Minimum(2*k-n, n-2*k+2) ))); # G. C. Greubel, Jul 23 2019
CROSSREFS
KEYWORD
tabl,sign
AUTHOR
Clark Kimberling, Jan 09 2012
STATUS
approved