What are Armstrong Numbers?
An Armstrong number (also known as a narcissistic number, pluperfect digital invariant, or plus perfect number) is a number that equals the sum of its own digits each raised to the power of the number of digits. For a d-digit number, each digit is raised to the d-th power, and if the sum equals the original number, it is an Armstrong number.
For example, 153 is an Armstrong number because it has 3 digits, and 1³ + 5³ + 3³ = 1 + 125 + 27 = 153. Similarly, 370 = 3³ + 7³ + 0³ = 27 + 343 + 0 = 370, and 371 = 3³ + 7³ + 1³ = 27 + 343 + 1 = 371.
Complete List in Base 10
There are only 88 Armstrong numbers in base 10. The single-digit ones are trivially 0 through 9 (since any single digit raised to the power 1 equals itself). The multi-digit Armstrong numbers begin with: 153, 370, 371, 407 (3-digit); 1634, 8208, 9474 (4-digit); 54748, 92727, 93084 (5-digit).
The largest Armstrong number in base 10 has 39 digits: 115,132,219,018,763,992,565,095,597,973,971,522,401. Since the maximum possible sum for a 40-digit number (9⁴⁰ × 40) is less than 1040, no 40-digit Armstrong number can exist, placing a finite upper bound on the sequence.
Why "Narcissistic"?
The name narcissistic number comes from the fact that these numbers are "self-admiring" — they are defined entirely in terms of their own digits. The name alludes to the Greek myth of Narcissus, who fell in love with his own reflection. The term was introduced by mathematician Joseph S. Madachy in 1966.
Mathematical Properties
Armstrong numbers are base-dependent — a number that is Armstrong in base 10 may not be Armstrong in other bases. In base 2, the only Armstrong numbers are 0 and 1. In base 3, there are 0, 1, 2, 5, 8, and 17. Every base has a finite number of Armstrong numbers.
The finiteness of Armstrong numbers in any base follows from the fact that for d-digit numbers, the maximum sum of d-th powers is d × (b−1)d (where b is the base), which grows polynomially in d, while the range of d-digit numbers grows exponentially. Eventually, the sum can never reach a d-digit number.
Programming Challenge
Finding Armstrong numbers is a classic programming exercise. The naive approach checks each number by extracting its digits, raising each to the appropriate power, and comparing the sum. More efficient algorithms use precomputed tables of digit powers and combinatorial generation of digit multisets. For competitive programming, Armstrong number detection is often used to test understanding of modular arithmetic, digit extraction, and exponentiation.
Related Concepts
Armstrong numbers belong to a broader family of digit-power invariant concepts. Happy numbers repeatedly sum the squares of their digits until reaching 1. Kaprekar numbers have the property that their square can be split into two parts that sum to the original. Automorphic numbers appear at the end of their own square (e.g., 25² = 625).