cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A340351 Square array, read by descending antidiagonals, where row n gives all solutions k > 0 to A000120(k)=A000120(k*n), A000120 is the Hamming weight.

Original entry on oeis.org

1, 2, 1, 3, 2, 3, 4, 3, 6, 1, 5, 4, 7, 2, 7, 6, 5, 12, 3, 14, 3, 7, 6, 14, 4, 15, 6, 7, 8, 7, 15, 5, 27, 7, 14, 1, 9, 8, 24, 6, 28, 12, 15, 2, 15, 10, 9, 28, 7, 30, 14, 19, 3, 30, 7, 11, 10, 30, 8, 31, 15, 28, 4, 31, 14, 3, 12, 11, 31, 9, 39, 24, 30, 5, 43, 15, 6, 3, 13, 12
Offset: 1

Views

Author

Thomas Scheuerle, Jan 05 2021

Keywords

Comments

Square array is read by descending antidiagonals, as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
Rows at positions 2^k are 1, 2, 3, ..., (A000027). Row 2n is equal to row n.
Values are different from those in A115872, because we use multiplication with carry here.

Examples

			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.
		

Crossrefs

Cf. A000120, A292849 (1st column), A340069, A077459 (3rd row).

Programs

  • 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