OFFSET
0,4
COMMENTS
LINKS
FORMULA
EXAMPLE
Array T(n, k) begins:
n\k| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
---+-----------------------------------------------------------------
0| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1| 1 1 2 2 5 5 6 6 9 9 10 10 13 13 14 14
2| 2 2 2 2 5 5 5 5 10 10 10 10 13 13 13 13
3| 3 2 2 3 4 5 5 4 11 10 10 11 12 13 13 12
4| 4 5 5 4 4 5 5 4 11 10 10 11 11 10 10 11
5| 5 5 5 5 5 5 5 5 10 10 10 10 10 10 10 10
6| 6 6 5 5 5 5 6 6 9 9 10 10 10 10 9 9
7| 7 6 5 4 4 5 6 7 8 9 10 11 11 10 9 8
8| 8 9 10 11 11 10 9 8 8 9 10 11 11 10 9 8
9| 9 9 10 10 10 10 9 9 9 9 10 10 10 10 9 9
10| 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
11| 11 10 10 11 11 10 10 11 11 10 10 11 11 10 10 11
12| 12 13 13 12 11 10 10 11 11 10 10 11 12 13 13 12
13| 13 13 13 13 10 10 10 10 10 10 10 10 13 13 13 13
14| 14 14 13 13 10 10 9 9 9 9 10 10 13 13 14 14
15| 15 14 13 12 11 10 9 8 8 9 10 11 12 13 14 15
PROG
(PARI) T(n, k) = { my (r=[], v=0); while (n||k, my (w=min(valuation(n+n%2, 2), valuation(k+k%2, 2))); r=concat(w, r); n\=2^w; k\=2^w); for (k=1, #r, v=(v+k%2)*2^r[k]-k%2); v }
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Feb 21 2021
STATUS
approved