Narcissistic Numbers: Numbers That Contain Their Own Secret
Take the number 153. Cube each of its digits and add them up:
1³ + 5³ + 3³ = 1 + 125 + 27 = 153
The number rebuilds itself from its own digits. Numbers with this property are called narcissistic numbers, after the Greek myth of Narcissus, who fell in love with his own reflection.
There are exactly 88 of them in base 10. Not "88 known so far," but 88, full stop. The largest has 39 digits. And the proof that the list is complete rests on a neat inequality anyone can follow.
A Search Over Infinitely Many Numbers Can Be Finished
At first glance, finding all narcissistic numbers seems impossible. There are infinitely many whole numbers, so how could you ever know you've found the last one?
The trick is that big numbers grow faster than the sums of their digit powers. Beyond a certain number of digits, it's mathematically impossible for the sum to catch up. So you only need to search a finite range, which computers finished decades ago.
The Definition
A number with n digits is narcissistic (also called an Armstrong number or a pluperfect digital invariant) if it equals the sum of its digits, each raised to the power n.
The 3-digit ones use cubes:
153 = 1³ + 5³ + 3³
370 = 3³ + 7³ + 0³ = 27 + 343 + 0
371 = 3³ + 7³ + 1³ = 27 + 343 + 1
407 = 4³ + 0³ + 7³ = 64 + 0 + 343
The 4-digit ones use fourth powers:
1634 = 1⁴ + 6⁴ + 3⁴ + 4⁴ = 1 + 1296 + 81 + 256
8208 = 8⁴ + 2⁴ + 0⁴ + 8⁴
9474 = 9⁴ + 4⁴ + 7⁴ + 4⁴ = 6561 + 256 + 2401 + 256
Every single-digit number 1 through 9 is trivially narcissistic (5¹ = 5). There are no 2-digit ones. Explore 153, 370 and 9474.
Why the List Must End
Consider a number with n digits.
The smallest it can be is 10ⁿ⁻¹ (like 1000 for n = 4).
The largest its digit-power sum can be is when every digit is 9:
n × 9ⁿ
For a narcissistic number, the digit-power sum must equal the number, so we need:
n × 9ⁿ ≥ 10ⁿ⁻¹
Compare how each side grows. Each extra digit multiplies the right side by 10, but the left side by only about 9 (times a small factor from n). Eventually 10ⁿ⁻¹ wins for good.
| n | n × 9ⁿ | 10ⁿ⁻¹ |
|---|---|---|
| 10 | ≈ 3.5 × 10¹⁰ | 10⁹ |
| 40 | ≈ 5.9 × 10³⁹ | 10³⁹ |
| 60 | ≈ 1.08 × 10⁵⁹ | 10⁵⁹ |
| 61 | ≈ 9.87 × 10⁵⁹ | 10⁶⁰ |
At n = 61, even a number made entirely of 9s can't produce a digit-power sum large enough. No narcissistic number can have 61 or more digits. You can check powers with the logarithm calculator: compare log₁₀(n) + n·log₁₀(9) with n − 1.
The Complete List
A finite search space is still enormous, up to 60 digits. Brute force over every number is impossible. Instead, programmers use a clever insight: the digit-power sum depends only on which digits appear, not their order.
So they loop over multisets of digits (how many 0s, how many 1s, …, how many 9s), compute the sum once, and check whether the result's digits match the multiset. That cuts the work by an astronomical factor.
In 1985, Dutch computer scientist Dik Winter used this kind of search to show there are exactly 88 narcissistic numbers in base 10. The largest:
115,132,219,018,763,992,565,095,597,973,971,522,401
It has 39 digits and equals the sum of the 39th powers of its digits.
An Insider Reference: Hardy Was Not Impressed
In his 1940 essay A Mathematician's Apology, the great English mathematician G. H. Hardy mentioned 153, 370, 371 and 407 by name. He called them "odd facts, very suitable for puzzle columns and likely to amuse amateurs," but said there was "nothing in them which appeals much to a mathematician."
His reason: the property depends on writing numbers in base 10, which is an accident of having ten fingers, not a deep truth about numbers. A number that's narcissistic in base 10 generally isn't in base 7 or base 16.
Whether you agree with Hardy or not, his objection points to a real distinction between digit-based properties and intrinsic ones like primality. Read more about him in our post on G. H. Hardy.
Why Programmers Love Them
"Find all Armstrong numbers below 10,000" is a classic beginner programming exercise. It practices loops, digit extraction with % 10 and powers:
for n in range(1, 10000):
digits = str(n)
k = len(digits)
if n == sum(int(d) ** k for d in digits):
print(n)
It prints 1–9, 153, 370, 371, 407, 1634, 8208 and 9474.
Two Concepts Worth Knowing
Exponential Growth Rates
When comparing aⁿ and bⁿ with a < b, bⁿ eventually dominates no matter what constant multiplies aⁿ. This is why a finite bound exists for narcissistic numbers.
Positional Notation
Digit-based properties depend on the base. The same number has different digits in different bases. See the table of bases.
Quick Answer: What Is a Narcissistic Number?
A narcissistic number equals the sum of its own digits, each raised to the power of the number of digits. For example, 153 = 1³ + 5³ + 3³. There are exactly 88 narcissistic numbers in base 10. None can have 61 or more digits, and the largest has 39 digits.
Try Them Yourself
- Number 153: the most famous narcissistic number
- Number 9474: a 4-digit example
- Cube Numbers List: the cubes behind 3-digit narcissistic numbers
- Logarithm Calculator: prove the 61-digit bound
- Table of Bases: see how digits change by base
- 42 Facts About 42: more numbers with personality
Verify that 371 and 407 are narcissistic using the cube numbers list. Then try to prove there are no 2-digit narcissistic numbers. (Hint: compare a² + b² with 10a + b.)