HOCUS + POCUS = PRESTO

This is a remarkable mathematical problem where each digit is represented by a capital letter. The same letter represents the same number when it is repeated (e.g. P is the same value whenever it appears). There is only one solution to the problem - what is it?

Example working (contains spoiler)

1. P must be 1, because it is the digit in the 100,000 column of the answer and only 1 can possibly be carried in addition.

2. H must be 8 or 9, to make the sum carry to the 100,000 column. If H=8, there would have to be 1 carried over into the 10,000 column (which would mean O>4). If H=9, it must mean that there is nothing carried over into the 10,000 column (which would mean O<5).

3. R must therefore 0, because P+H(+possibly 1 carried over)=R, which can only be 0 or 1 with 1 carried over. R cannot be 1 because P is already 1.

4. O must be an even number, because the unit column cannot have anything carried over from a lesser column, and S+S=O.

5. We shall then test the four hypotheses of O's value:

HYPOTHESIS 1: O=2. S must be 6 because S+S=O (S cannot be 1 because we have already establised that P is 1). C must be 3 or 8 (because C+C(+possibly 1 carried over)=S=6. E must be 4 or 5 (because O=2 and 2+2(+possibly 1 carried over)=E). H must be 9 (see point 2).

HYPOTHESIS 2: O=4. S must be 7 because S+S=O (S cannot be 2 because we have already establised that P is 1 and S=2 would make C=1). C must be 3 (because C+C+1 carried over=S=7. E must be 8 (because O+O(+possibly 1 carried over)=E). H must be 9 (see point 2).

HYPOTHESIS 3: O=6. S would have to be 8, because S+S=O (S could not be 3, because C+C+1 carried over=S=3 which would make C=1, but we have already establised that P is 1). If O=6, O+O=12, i.e. E=2 with 1 carried over into the 10,000 column. This means H=8 (see point 2 above), which renders this a false hypothesis, since S would have to be 8 in this hypothesis.

HYPOTHESIS 4: O=8. S would have to be 4 or 9, because S+S=O; but really it could only be 9 because C would have to be 4 (because C+C+1 carried over=S). This means H=8 (see point 2 above), which renders this a false hypothesis, since O would have to be 8 in this hypothesis.

6. By eliminating hypotheses 3 and 4 above, we can state that H=9 and narrow down O to either 2 or 4, which means S is either 6 or 7 (S cannot be 1 because P is already 1; S cannot be 2 because that would make C=1, and P is already 1).

7. Since S+S>10, this means 1 must be carried from the units to the 10 column, and therefore T must be an odd number, since U+U+1=T. T cannot be 1 (because P=1), 3 (because that would mean that U would be 1, and P=1) or 9 (because H=9). T is therefore 5 or 7 - and U is 2 or 3, because U+U+1=T.

8. If S=7, O would be 4 (because S+S=O, with 1 carried to the 10s column) and C would be 3 (because C+C=S, and 1 would have to be carried from then 10s column). If S=7, T would have to be 5 (see point 7), which would make U=2 (because U+U+1=T). This hypothesis must be false because U+U+1=T<10 which means nothing is carried over into the 100s column, which is essential to make C+C=S=7.

9. The only remaining value for S is 6 (see point 6). This would make O=2 (because S+S=O, with 1 carried to the 10s column). Since O=2, U can only be 3 (see point 7), which means T=7.

10. If S=6 and U=3, C can only 8 (because C+C=S=6, with 1 carried over into the 1000s column). This must mean that E=5 (because we know O=2 and 1 is definitely carried over; O+O+1=E=5), which means all the letters have been assigned numbers and that the puzzle is solved.

Solution (contains spoiler)

HOCUS + POCUS = PRESTO

92836 + 12836 = 105672