OFFSET
1,2
LINKS
FORMULA
T(n, 0) = A213636(n).
T(n, n-1) = (-1)^(n-1).
EXAMPLE
Triangle T(n, k) begins:
n n-th row
-- ---------------------------------------------
1 1
2 2, -1
3 1, -1, 1
4 1, -1, -1, -1
5 1, 1, 1, 2, 1
6 2, -1, -2, -1, -1, -1
7 1, 2, 1, 1, 1, -1, 1
8 2, -1, -2, -1, 1, -1, 2, -1
9 1, -1, 1, -2, 1, -2, 1, -1, 1
10 1, -1, -1, -1, 2, -1, 1, -1, -1, -1
11 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1
12 2, -1, -2, -1, -1, -1, -2, -1, -2, -1, -1, -1
PROG
(PARI) T(n, k) = { for (m = 2, oo, my (d = (n%m) - (k%m)); if (d, return (d); ); ); }
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Jul 07 2024
STATUS
approved