There are $60$ different 3-letter combinations of A,B,C,D,E. Using each letter to represent a different integer from $1$ to $9$, what is the solution for ABCDE to equal the sum of all 3-letter combinations (ABC + ABD + ABE + BAC + BAD + . . .)?

As well as the correct solution, the best answer should include simplified expression for this problem.

  • $\begingroup$ To clarify: ABC means the concatenation of A, B and C, not the product of A, B and C, correct? $\endgroup$ Commented Feb 13, 2015 at 9:31
  • $\begingroup$ @No.7892142 - Correct (a cryptarithm). $\endgroup$
    – Len
    Commented Feb 13, 2015 at 10:45

2 Answers 2


First let's look at what all the 60 combinations look like. Consider the first digit - obviously, we have 5 choices for which letter to place there. Since there are a total of 60 combinations, each letter must appear there a total of 12 times. Therefore, we can add up everything contributing to the sum from just that place alone as 1200*(A+B+C+D+E). This argument can be applied to each digit separately, so we can evaluate the entire sum as 1332*(A+B+C+D+E) since 12+120+1200=1332.

Now, the constraint that each letter must represent a distinct number means that the sum A+B+C+D+E must fall somewhere in the range of 15 (1+2+3+4+5) to 35 (9+8+7+6+5), inclusive. That's actually a small enough range to check by hand, in which case you get


as the unique answer for this problem.


When you get $ABCDE=1332(A+B+C+D+E)$, there is a shorter way than checking all possible sums for $A+B+C+D+E$, which, as @SpectralFlame pointed out, can go from 15 to 35. Note that:

$9 \mid 1332$, so $9 \mid ABCDE$. Because a number is divisible by 9 iff the sum of the digits is divisible by $9$, this gives $9 \mid A+B+C+D+E$.


We only have to check $A+B+C+D+E=18$ and $A+B+C+D+E=27$, which give $23976$ (whose digit sum is 27) and 35964 (whose digit sum is indeed 27), so the latter is indeed the only solution.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.