OFFSET
0,8
COMMENTS
In other words, A(n, k) encodes the product of the polynomials encoded by n and k.
FORMULA
EXAMPLE
Array A(n, k) begins:
n\k| 0 1 2 3 4 5 6 7 8 9 10 11
---+---------------------------------------------------------------------
0| 0 0 0 0 0 0 0 0 0 0 0 0
1| 0 1 2 3 4 5 6 7 8 9 10 11
2| 0 2 9 12 35 38 49 56 135 142 153 156
3| 0 3 12 15 48 51 60 63 192 195 204 207
4| 0 4 35 48 271 284 387 448 2111 2172 2275 2288
5| 0 5 38 51 284 313 398 455 2168 2289 2502 2531
6| 0 6 49 60 387 398 481 504 3079 3102 3185 3196
7| 0 7 56 63 448 455 504 511 3584 3591 3640 3647
8| 0 8 135 192 2111 2168 3079 3584 33279 33784 34695 34752
9| 0 9 142 195 2172 2289 3102 3591 33784 34785 36622 36739
10| 0 10 153 204 2275 2502 3185 3640 34695 36622 39993 40476
11| 0 11 156 207 2288 2531 3196 3647 34752 36739 40476 40719
12| 0 12 195 240 3087 3132 3843 4032 49215 49404 50115 50160
PROG
(PARI) toruns(n) = { my (r=[]); while (n, my (v=valuation(n+n%2, 2)); n\=2^v; r=concat(v, r)); r }
fromruns(r) = { my (v=0); for (k=1, #r, v=(v+k%2)*2^r[k]-k%2); v }
A(n, k) = { fromruns(Vec(Pol(toruns(n)) * Pol(toruns(k)))) }
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Jul 13 2022
STATUS
approved