OFFSET
1,1
COMMENTS
EXAMPLE
k = 4:
w(1) + w(2) + w(3) = w(5) + w(6) = 4.
Thus the balancing number k = 4 is a term. The balancer r = 2.
k = 5:
w(1) + w(2) + w(3) + w(4) = w(6) + w(7) = 5.
Thus the balancing number k = 5 is a term. The balancer r = 2.
w(i) = A000120(i).
MATHEMATICA
With[{m = 500}, w = DigitCount[Range[m], 2, 1]; s = Accumulate[w]; Select[Range[2, m], MemberQ[s, 2*s[[#]] - w[[#]]] &]] (* Amiram Eldar, Dec 02 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Dec 02 2022
STATUS
approved