OFFSET
1,2
COMMENTS
EXAMPLE
Eight initial terms of rows 1 - 8 are listed below:
1: 1, 2, 3, 4, 5, 6, 7, 8, ...
2: 1, 2, 3, 4, 5, 6, 7, 8, ...
3: 3, 6, 7, 12, 14, 15, 24, 28, ...
4: 1, 2, 3, 4, 5, 6, 7, 8, ...
5: 7, 14, 15, 27, 28, 30, 31, 39, ...
6: 3, 6, 7, 12, 14, 15, 24, 28, ...
7: 7, 14, 15, 19, 28, 30, 31, 37, ...
8: 1, 2, 3, 4, 5, 6, 7, 8, ...
a(6,3) = 7 because: 7 in binary is 111 and 6*7 = 42 in binary is 101001, both have 3 bits set to 1.
PROG
(MATLAB)
function [a] = A340351(max_n)
for n = 1:max_n
m = 1;
k = 1;
while m < max_n
c = length(find(bitget(k, 1:32)== 1));
if c == length(find(bitget(n*k, 1:32)== 1))
a(n, m) = k;
m = m+1;
end
k = k +1;
end
end
end
CROSSREFS
KEYWORD
AUTHOR
Thomas Scheuerle, Jan 05 2021
STATUS
approved