OFFSET
0,24
COMMENTS
The digits in the balanced ternary expansion of A(n, k) correspond to determinants of 2 X 2 matrices made up of binary digits of n and k.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10010
Rémy Sigrist, Colored scatterplot of (n, k) with n, k <= 2^10 (where the color denotes the sign of A(n, k): blue, black and red for -1, 0 and +1, respectively)
FORMULA
A(k, n) = -A(n, k).
A(n, n) = 0.
EXAMPLE
Array A(n, k) begins:
n\k | 0 1 2 3 4 5 6 7 8 9 10
----+-----------------------------------------
0 | 0 0 0 0 0 0 0 0 0 0 0
1 | 0 0 -1 -1 0 0 -1 -1 0 0 -1
2 | 0 1 0 1 -3 -2 -3 -2 0 1 0
3 | 0 1 -1 0 -3 -2 -4 -3 0 1 -1
4 | 0 0 3 3 0 0 3 3 -9 -9 -6
5 | 0 0 2 2 0 0 2 2 -9 -9 -7
6 | 0 1 3 4 -3 -2 0 1 -9 -8 -6
7 | 0 1 2 3 -3 -2 -1 0 -9 -8 -7
8 | 0 0 0 0 9 9 9 9 0 0 0
9 | 0 0 -1 -1 9 9 8 8 0 0 -1
10 | 0 1 0 1 6 7 6 7 0 1 0
PROG
(PARI) A(n, k) = { my (v = 0, t = 1); while (n && k, v += (bittest(n, 1)*bittest(k, 0) - bittest(n, 0)*bittest(k, 1)) * t; n \= 2; k \= 2; t *= 3; ); return (v); }
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Apr 28 2024
STATUS
approved