# Sum of three six digit numbers

This puzzle is a variation of a 3 digit addition puzzle I saw recently.

A , B , and C are positive integers between 0 and 9. A,B and C are different integers

Six digit numbers formed using A,B and C are given in the following equation

ABCABB+BBBCAB-BCBABC = CCCCCC

What are the values of A,B and C?

Beastly Gerbil has pointed out (by using a solver) that this has 6 solutions. Thanks. Can you get it without a computer? Please explain how.

• I had a feeling this would have multiple solutions so I ran it through a solver (don't worry, wasn't going to post an answer). I was right - it has 6 solutions. Aug 28 '17 at 20:31
• I guess I am hoping the answerers will not use the computer. Thanks for your comment though
– DrD
Aug 28 '17 at 20:36
• @Beastly Gerbil even without computers it's very easy to show that there are 17 solutions so I guess you are not counting those where A=B=C or those with leading zeroes? Aug 28 '17 at 20:50
• @user39583 yeah - the general rule with alphametics are no leading zeroes Aug 28 '17 at 21:24

From

a*10^5+b*10^4+c*10^3+a*10^2+b*10^1+b*10^0
+ b*10^5+b*10^4+b*10^3+c*10^2+a*10^1+b*10^0
- b*10^5+c*10^4+b*10^3+a*10^2+b*10^1+c*10^0
= c*10^5+c*10^4+c*10^3+c*10^2+c*10^1+c*10^0
We get
a*100010+20002*b+1100*c-10001*c = 111111*c

and we get that:

6*c=5*a+b
Now you just try a=0,a=1 up to a=9, or you can (for integers only, i lost real solutions, but that does not matter):
b=a+6*t, c=a+t, and viable solutions where t is integer are:
b=a+6, c=a+1
and
b=a-6, c=a-1

So 8 solutions are:

(6,0,5)(7,1,6)(8,2,7)(9,3,8)
(0,6,1)(1,7,2)(2,8,3)(3,9,4)

• I like your logic Jan Ivan
– DrD
Aug 29 '17 at 18:57

Looking at the last column,

2B = 2C (mod 10), so they differ by 5.

Looking at the first column,

there must be a carry, so C = A + 1

Then from the penultimate column,

there is a carry from the last column, so B = C + 5 = A + 6.

And then the remaining columns just repeat the same constraints.

Solutions :

(A, B, C) is one of (7,1,6), (8,2,7), (9,3,8), (1,7,2), (2,8,3), (3,9,4)

Explanation:

We can simplify the equation by reducing the letters that appear on the same column with + and - and we get

ABC00B +
B0CAB -
C000C =
CCCCCC

B+B and C+C end up with the same digit (from the units column).
This means that B and C differ by 5.

Now we can blindly stab at it.
Let's assume B = 1.
We immediately get C = 6 and now have

A16001 +
106A1 -
60006 =
666666

The value that fits for A is 7.
So we have (A,B,C) = (7,1,6)

Let's move on to B = 2. We get C = 7.

A27002 +
207A2 -
70007 =
777777

We get A = 8.
So we have (A,B,C) = (8,2,7)

For B = 3 we get C = 8.
Following the same logic we get A = 9.
So we have (A,B,C) = (9,3,8)

For B = 4 we get C = 9 and we have

A49004 +
409A4 -
90009 =
999999

This gets us nowhere.

For B = 5 we get C = 0 so this is wrong.

For B = 6 we get C = 1.

A61006 +
601A6 -
10001 =
111111

A should be 0. Which does not work.

For B = 7 we get C = 2 and A = 1
For B = 8 we get C = 3 and A = 2
For B = 9 we get C = 4 and A = 3

After cancelling identical terms (and replacing the corresponding positions by zero=0), we get:

     AB000B
+ 0B00AB
- 0C000C
---------
CC00CC


This leaves $2B=2C+10$ and $C=A+1$. The first equation $B=C+5$ implies $0\le C\le4$, and the second equation implies $C\ge1$. This yields the following solutions:

• $C=1$, $A=0$, $B=6$
• $C=2$, $A=1$, $B=7$
• $C=3$, $A=2$, $B=8$
• $C=4$, $A=3$, $B=9$

(If you do not want leading zeroes, then the first solution disappears.)

I found 4 of the 6 solutions to this:

 A=0, B=6, C=1
A=1, B=7, C=2
A=2, B=8, C=3
A=3, B=9, C=4


This is how I got them:

 Initially, we have 0 ≤ A, B, C ≤ 9. From the rightmost column, we get:

1) 2B - C = C + 10
B = C + 5

And the +10 part means we have a carry for the next columns, which leads us to:

2) A + 1 = C

Using equation 1, we now have more information on the ranges for B and C

0 ≤ C ≤ 4
5 ≤ B ≤ 9

1 ≤ C ≤ 4
0 ≤ A ≤ 3
6 ≤ B ≤ 9

Now, using this information, I got the 4 sets of values by first writing out the A
values, then calculation C, then B

A   C    B
0  0+1 0+1+5
1  1+1 1+1+5
2  2+1 2+1+5
3  3+1 3+1+5


Mostly trial and error. But got my answer in second attempt.

A=3, B=9, C=4

Logic behind my approach

possible combination for the last digit (which is 2B-C = C +/- 10x) where B=0 & C=5, which was eliminated in previous answer, then I just tried for another such possibility which seemed to be B=9, C=4. Had this failed my next attempt would have been B=4, C=9

Another one

A=9, B=3, C=8

C=0,B=5,A=9.I took numbers 0to9 and looked at middle numbers And tried out middle letter as 4 or 5 .and figured out that B is either 4 or 5 .I then looked at last column and added B aND B and figured out C =0 .then I looked at column before last .added 1 from the 10 of last column to B and subtracted the other B in column before last and figured out A to give a total of 10.

• Sorry it seams to work except for the long column ACA Aug 29 '17 at 4:47
• 1.I looked at the range of integers 0 to 9 and averaged them out .middle number should be 4 or 5. 2)I figured B is between A&CA then B is either 4 or 5. 3)I tried out last column with B =5 and figured out C must be equal to 0 which is part of the number 10. 4) it seems to work EXCEPT FOR column 3 from last!! Aug 29 '17 at 5:10
• C cannot be 0. It's an alphametic rule Aug 29 '17 at 6:02