# Sum three terms & digits

Max Alekseyev maxale at gmail.com
Thu May 24 00:54:58 CEST 2007

```Peter,

Actually, there was a bug in my program. Thanks for your program and
the sequence.
After fixing the bug, I have got the following sequence (with one
extra term as compared to your sequence):

1, 2, 3, 4, 5, 7, 8, 9, 10, 14, 15, 31, 32, 33, 34, 35, 37, 38, 39,
40, 43, 44, 63, 64, 65, 68, 69, 73, 76, 79, 80, 83, 86, 88, 96, 116,
118, 119, 120, 124, 125, 128, 140, 267, 426, 440, 445, 446, 447, 460,
474, 604, 733, 774, 775, 777, 778, 779, 785, 797, 818, 819, 830, 873,
888, 889, 890, 893, 894, 913, 915, 916, 939, 945, 977, 1111, 1114,
1128, 1148, 1224, 1227, 1229, 1400, 2704, 2729, 2732, 2939, 2940,
2972, 2973, 4223, 4320, 6608, 6623, 6680, 6688, 7743, 7760, 9608,
14854, 48310, 199058, 374854

And this sequence is finite and complete!

Proof:
Suppose that the next term is x, then the sum
s = 199058 + 374854 + x
may contain only decimal digits 2 and 6.
First note that if s deliver the required number x, then so does the
number s'=(s mod 10^6).
Therefore, we can limit our search for s to 6-digit numbers, but they
give no solution.

Max

On 5/23/07, Peter Pein <petsie at dordos.net> wrote:

>  I think you misunderstood Eric's intention (or I did so). He wrote:
> "9+10+14=33 and "33" shares nothing...". Therefore the union of the lhs-digits
> shall have an empty intersection with the rhs-digits (10 and 14 would share
> the "1").
>
> My Mathematica-approach is:
>
> noCommonDigit[{a_, b_}] :=
>   Module[{c = b + 1, abDigits = IntegerDigits[{a, b}]},
>    While[
>     Intersection[Flatten[{abDigits, IntegerDigits[c]}],
>                  IntegerDigits[a + b + c]] =!= {},
>     c++];
>    c]
>
> Prepend[
>   Last /@ NestList[Through[{Last, noCommonDigit}[#1]] & , {1, 2}, 100],
> 1]
>
> {1, 2, 3, 4, 5, 7, 8, 9, 10, 14, 15, 31, 32, 33, 34, 35, 37, 38, 39, 40, 43,
> 44, 63, 64, 65, 68, 69, 73, 76, 79, 80, 83, 86, 88, 96, 116, 118, 119, 120,
> 124, 125, 128, 140, 267, 426, 440, 445, 446, 447, 460, 474, 604, 733, 774,
> 775, 777, 778, 779, 785, 797, 818, 819, 830, 873, 888, 889, 890, 893, 894,
> 913, 915, 916, 939, 945, 977, 1111, 1114, 1128, 1148, 1224, 1227, 1229, 1400,
> 2704, 2729, 2732, 2939, 2940, 2972, 2973, 4223, 4320, 6608, 6623, 6680, 6688,
> 7743, 7760, 9608, 14854, 48310, 159058}
>
>
> Regards,
> Peter
>

```