OFFSET
1
LINKS
D. Applegate, M. LeBrun and N. J. A. Sloane, Dismal Arithmetic, arXiv:1107.1130 [math.NT], 2011.
EXAMPLE
a(9) = 1 because 9 does not occur anywhere in the inner portion of the OR-numbral multiplication table A067138 (apart from its row/column 1). On the other hand, a(7) = 0 because A067138(3,3) = 7. - Antti Karttunen, Mar 21 2021
PROG
(Python)
def addn(m1, m2):
s1, s2 = bin(m1)[2:].zfill(0), bin(m2)[2:].zfill(0)
len_max = max(len(s1), len(s2))
return int(''.join(max(i, j) for i, j in zip(s1.rjust(len_max, '0'), s2.rjust(len_max, '0'))))
def muln(m1, m2):
s1, s2, prod = bin(m1)[2:].zfill(0), bin(m2)[2:].zfill(0), '0'
for i in range(len(s2)):
k = s2[-i-1]; prod = addn(int(str(prod), 2), int(''.join(min(j, k) for j in s1), 2)*2**i)
return prod
m = 1; m_size = 7; L_im = [1]
while m <= 2**m_size:
for i in range(2, m + 1):
im_st = str(muln(i, m)); im = int(im_st, 2); im_len = len(im_st)
if im_len > m_size: break
if im not in L_im: L_im.append(im)
print(1) if m not in L_im else print(0); m += 1
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ya-Ping Lu, Mar 19 2021
STATUS
approved