A374381 Triangle T(n, k), n > 0, k = 0..n-1, read by rows; T(n, k) = (n mod m) - (k mod m) where m = A007978(n-k).
1, 2, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 2, 1, 2, -1, -2, -1, -1, -1, 1, 2, 1, 1, 1, -1, 1, 2, -1, -2, -1, 1, -1, 2, -1, 1, -1, 1, -2, 1, -2, 1, -1, 1, 1, -1, -1, -1, 2, -1, 1, -1, -1, -1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, -1, -2, -1, -1, -1, -2, -1, -2, -1, -1, -1
Offset: 1
Examples
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
Links
- Rémy Sigrist, Scatterplot of (x, y) such that T(x, y) > 0 and x <= 420
Programs
-
PARI
T(n, k) = { for (m = 2, oo, my (d = (n%m) - (k%m)); if (d, return (d););); }
Formula
T(n, 0) = A213636(n).
T(n, n-1) = (-1)^(n-1).