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.

Showing 1-1 of 1 results.

A352727 Square array A(n, k), n, k >= 0, read by antidiagonals: the binary expansion of A(n, k) contains the runs of consecutive 1's that appear both in the binary expansions of n and k.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0
Offset: 0

Views

Author

Rémy Sigrist, Mar 30 2022

Keywords

Comments

We only consider maximal runs of one or more consecutive 1's (as counted by A069010) that completely match in binary expansions of n and k, not simply single common 1's.

Examples

			Table A(n, k) begins:
  n\k|  0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15
  ---+------------------------------------------------------
    0|  0  0  0  0  0  0  0  0  0  0   0   0   0   0   0   0
    1|  0  1  0  0  0  1  0  0  0  1   0   0   0   1   0   0
    2|  0  0  2  0  0  0  0  0  0  0   2   0   0   0   0   0
    3|  0  0  0  3  0  0  0  0  0  0   0   3   0   0   0   0
    4|  0  0  0  0  4  4  0  0  0  0   0   0   0   0   0   0
    5|  0  1  0  0  4  5  0  0  0  1   0   0   0   1   0   0
    6|  0  0  0  0  0  0  6  0  0  0   0   0   0   0   0   0
    7|  0  0  0  0  0  0  0  7  0  0   0   0   0   0   0   0
    8|  0  0  0  0  0  0  0  0  8  8   8   8   0   0   0   0
    9|  0  1  0  0  0  1  0  0  8  9   8   8   0   1   0   0
   10|  0  0  2  0  0  0  0  0  8  8  10   8   0   0   0   0
   11|  0  0  0  3  0  0  0  0  8  8   8  11   0   0   0   0
   12|  0  0  0  0  0  0  0  0  0  0   0   0  12  12   0   0
   13|  0  1  0  0  0  1  0  0  0  1   0   0  12  13   0   0
   14|  0  0  0  0  0  0  0  0  0  0   0   0   0   0  14   0
   15|  0  0  0  0  0  0  0  0  0  0   0   0   0   0   0  15
		

Crossrefs

Programs

  • PARI
    A352724(n) = { my (r=[], o=0); while (n, my (v=valuation(n+n%2, 2)); if (n%2, r=concat(r, (2^v-1)*2^o)); o+=v; n\=2^v); r }
    A(n,k) = vecsum(setintersect(A352724(n), A352724(k)))

Formula

A(n, k) = A(k, n).
A(n, 0) = 0.
A(n, n) = n.
A(n, 2*n) = 0.
A(n, k) <= A004198(n, k) (bitwise AND operator).
A(n, n+1) = A352729(n).
Showing 1-1 of 1 results.