OFFSET
0,24
COMMENTS
The digits in the ternary expansion of A(n, k) correspond to permanents 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
FORMULA
A(k, n) = A(n, k).
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 4 3 4 0 1 0
3 | 0 1 1 2 3 4 4 5 0 1 1
4 | 0 0 3 3 0 0 3 3 9 9 12
5 | 0 0 4 4 0 0 4 4 9 9 13
6 | 0 1 3 4 3 4 6 7 9 10 12
7 | 0 1 4 5 3 4 7 8 9 10 13
8 | 0 0 0 0 9 9 9 9 0 0 0
9 | 0 0 1 1 9 9 10 10 0 0 1
10 | 0 1 0 1 12 13 12 13 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