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.

A386971 Numbers k >= 1 such that w(k-r) + ... + w(k-1) = w(k+1) + ... + w(k+r) for some r >= 1 where w(i) is the binary weight of i (A000120).

Original entry on oeis.org

3, 4, 7, 8, 11, 12, 14, 15, 16, 17, 19, 20, 23, 24, 27, 28, 29, 31, 32, 34, 35, 36, 39, 40, 43, 44, 46, 47, 48, 49, 51, 52, 55, 56, 58, 59, 60, 63, 64, 67, 68, 69, 71, 72, 75, 76, 78, 79, 80, 81, 83, 84, 87, 88, 91, 92, 93, 95, 96, 98, 99, 100, 103, 104, 107
Offset: 1

Views

Author

Ctibor O. Zizka, Aug 11 2025

Keywords

Comments

r = 1 for k from A047457, k = 8*x - 5 or k = 8*x - 4, x >= 1.
r = 2 for k = 32*x - 18, (2* 7th row of A097586) or k = 32*x - 15, (10th row of A097586), x >= 1.

Examples

			For k = 7: A000120(4) + A000120(5) + A000120(6) = A000120(8) + A000120(9) + A000120(10), thus 7 is a term.
		

Crossrefs

Programs

  • Mathematica
    q[k_] := Module[{s = 0, r = 1}, While[r < k && (r == 1 || s != 0), s += (DigitSum[k-r, 2] - DigitSum[k+r, 2]); r++]; 1 < r <= k && s ==0]; Select[Range[120], q] (* Amiram Eldar, Aug 12 2025 *)