A067138 OR-numbral multiplication table, read by antidiagonals.
0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 4, 3, 0, 0, 4, 6, 6, 4, 0, 0, 5, 8, 7, 8, 5, 0, 0, 6, 10, 12, 12, 10, 6, 0, 0, 7, 12, 15, 16, 15, 12, 7, 0, 0, 8, 14, 14, 20, 20, 14, 14, 8, 0, 0, 9, 16, 15, 24, 21, 24, 15, 16, 9, 0, 0, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 0, 0, 11, 20, 27, 32, 31, 28
Offset: 0
Examples
The top left 0..16 x 0..16 corner of the array: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 0, 3, 6, 7, 12, 15, 14, 15, 24, 27, 30, 31, 28, 31, 30, 31, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 0, 5, 10, 15, 20, 21, 30, 31, 40, 45, 42, 47, 60, 61, 62, 63, 0, 6, 12, 14, 24, 30, 28, 30, 48, 54, 60, 62, 56, 62, 60, 62, 0, 7, 14, 15, 28, 31, 30, 31, 56, 63, 62, 63, 60, 63, 62, 63, 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 0, 9, 18, 27, 36, 45, 54, 63, 72, 73, 90, 91, 108, 109, 126, 127, 0, 10, 20, 30, 40, 42, 60, 62, 80, 90, 84, 94, 120, 122, 124, 126, 0, 11, 22, 31, 44, 47, 62, 63, 88, 91, 94, 95, 124, 127, 126, 127, 0, 12, 24, 28, 48, 60, 56, 60, 96, 108, 120, 124, 112, 124, 120, 124, 0, 13, 26, 31, 52, 61, 62, 63, 104, 109, 122, 127, 124, 125, 126, 127, 0, 14, 28, 30, 56, 62, 60, 62, 112, 126, 124, 126, 120, 126, 124, 126, 0, 15, 30, 31, 60, 63, 62, 63, 120, 127, 126, 127, 124, 127, 126, 127, 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, . Multiplying 3 ("11" in binary) with itself in this system means taking bitwise-or of "11" with itself, when shifted one bit-position left: 11 110 ------- OR: 111 = 7 in decimal = A(3,3). . Multiplying 10 (= "1010" in binary) and 11 (= "1011" in binary) in this system means taking bitwise-or of binary number 1011 when shifted once left with the same binary number when shifted three bit-positions left: 10110 1011000 ------- OR: 1011110 = 94 in decimal = A(10,11) = A(11,10).
Links
Crossrefs
Programs
-
PARI
t(n, k) = {res = 0; for (i=0, length(binary(n))-1, if (bittest(n, i), res = bitor(res, shift(k, i)));); return (res);} \\ Michel Marcus, Apr 14 2013
Formula
From Rémy Sigrist, Mar 17 2021: (Start)
T(n, 0) = 0.
T(n, 1) = n.
T(n, 2^k) = n*2^k for any k >= 0.
T(n, n) = A067398(n).
(End)
Extensions
Example-section rewritten by Antti Karttunen, Mar 17 2021
Comments