An Armstrong number is a three-digit integer that is the sum of the cubes of its digits. This simply means that if xyz = x3+y3+z3, it is an Armstrong number. For example, 153 is an Armstrong number because 13+53+33 = 153.
Similarly, a number that comprises four digits is an Armstrong number if the sum of its digits raised to the power of four results in that number. For example, pqrs = p4+q 4+r 4+s4.