[seqfan] Re: Balanced / Unbalanced numbers

M. F. Hasler seqfan at hasler.fr
Sun Dec 9 22:58:34 CET 2018

On Sun, 9 Dec 2018, 11:40 Neil Sloane <njasloane at gmail.com wrote:

> I liked it a lot until I came to the point about "if there are two choices,
> follow both branches".
> So this is a non-deterministic process: you have to keep track of all the
> descendants - all the children, grandchildren, ... - until one of them
> finds a happy marriage and produces a balanced child ?

To avoid this, one could simply replace "closest" by "next larger".

On Sun, Dec 9, 2018 at 9:54 AM Éric Angelini <bk263401 at skynet.be> wrote:
> > Hello SeqFans,
> > let's call "Balanced" the integers of A036301 <http://oeis.org/A036301> (Numbers
> n such that sum of even digits of n equals sum of odd digits of n.)

and "Unbalanced" the others.
> >
> > Take an Unbalanced and add to it its closest Balanced;
> > if the result is Balanced, stop.
> > If the result is Unbalanced, iterate.
> >
> > Question:
> > Do all Unbalanced end on a Balanced?

No. All numbers strictly between 0 and 112 are unbalanced.
Thus, for all positive numbers less 112/2 = 56, the nearest balanced number
is 0,
and you can add it infinitely many times without ever reaching a balanced

- Maximilian

More information about the SeqFan mailing list