Armstrong number: An n -digit number equal to the sum of the n th powers of its digits.
All single digit numbers are Armstrong numbers. For example, test 6. One digit. 6^1 = 6. Armstrong number.
Test 371. Three digits. 3^3 + 7^3 + 1^3 = 27 + 343 + 1 = 371. Armstrong number.
Test 1634. Four digits. 1^4 + 6^4 + 3^4 + 4^4 = 1 + 1296 + 81 + 256 = 1634. Armstrong number.
There are two 4-digit Armstrong numbers.
A 5-digit Armstrong number? 54748
5^5 + 4^5 + 7^5 + 4^5 + 8^5 = 3125 + 1024 + 16807 + 1024 + 32768 = 54748