# What are these numbers?

A simple (I think) alphametic puzzle

$\small{MADMEN = (M+A+D+M+E+N)^{((M+E+N) - (M+A+D))}}$ M,A,D,E,N are different (no repeats) positive integers between 0 and 9 and of course the 2 Ms are the same number.

MADMEN is a 6 digit number.

What is it?

No Programming please. An explanation would be appreciated

• Edited the equation to show it how it really is if thats ok? – Beastly Gerbil Sep 12 '17 at 20:28
• No problem Beastly Gerbil – DEEM Sep 12 '17 at 22:51

MADMEN is a 6 digit number so M cannot be 0.

M+A+D+M+E+N must be >= 1+0+2+1+3+4 >= 11

M+A+D+M+E+N must be <= 9+8+7+9+6+5 <= 44

11^6 > 999999 and 44^3 < 100000 so 4 <= E+N-A-D <= 5

If E+N-A-D = 4 then M+A+D+M+E+N in range 18-31, because 17^4 < 100000 and 32^4 > 999999

If E+N-A-D = 5 then M+A+D+M+E+N in range 11-15, because 10^5 = 100000 and 15^5 > 999999

By observation (i.e. hand calculation) no number in range 11-15 to power 5 is of form MxxMxx

By observation (i.e. hand calculation) only 22^4 and 28^4 have the form MxxMxx (234256, and 614656 respectively)

...but 28^4 is actually MxxMxM so is an invalid option.

Solution:

Substituting M=2, A=3, D=4, E=5, N=6, provides the valid solution (2+3+4+2+5+6)^((2+5+6)-(2+3+4)) = 234256, so from above, 234256 is the only valid solution for MADMEN.

• That was the logic I was looking for. Great. – DEEM Sep 13 '17 at 12:41