IP331.com | Online Tools
HomeNumber Theory ToolsPerfect Digital Invariant Calculator

Perfect Digital Invariant Calculator

Enter a positive integer to check if it is an Armstrong (narcissistic) number

Enter Number

Perfect Digital Invariant Definition

n = sum(digit_i^d) where d = number of digits
Also called: Armstrong, narcissistic, pluperfect
153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27
88 known PDI numbers in base 10

A perfect digital invariant (PDI) is a number that equals the sum of its digits raised to the power of the number of digits. These self-descriptive numbers are also called Armstrong numbers after Michael F. Armstrong.

All single-digit numbers 0-9 are trivially PDI. There are no 2-digit PDIs in base 10. The largest has 39 digits.

What Is a Perfect Digital Invariant?

A perfect digital invariant is a number that equals the sum of its digits raised to the power of its digit length. These numbers are sometimes called narcissistic because they are self-referential. They are a fascinating class of numbers in recreational mathematics.

3-Digit PDIs

153, 370, 371, 407. These are the only four 3-digit Armstrong numbers. 153 is the most famous (the biblical number of fish).

4-Digit PDIs

1634, 8208, 9474. Only three 4-digit Armstrong numbers exist. 1634 = 1^4+6^4+3^4+4^4.

Naming History

Called Armstrong numbers after Michael Armstrong who used them as programming exercises. Also called pluperfect digital invariants or narcissistic numbers.

Base Dependence

PDI property is base-dependent. In base 2, only 0 and 1. In base 4: 0,1,2,3,130. Each base has a finite set of PDIs.

Teaching Example: Test 153. Digits: 1,5,3. Count = 3. Compute: 1^3=1, 5^3=125, 3^3=27. Sum = 1+125+27 = 153. Matches! 153 is a narcissistic number. Test 1634: 4 digits. 1^4+6^4+3^4+4^4 = 1+1296+81+256 = 1634. Also narcissistic!

Applications

Recreational Math Programming Puzzles Number Theory Digit Analysis Math Education Competitions

FAQs about Perfect Digital Invariants

What is an Armstrong number?
A number equal to sum of its digits raised to power of digit count. 153 = 1^3+5^3+3^3. Also called narcissistic number.
How many narcissistic numbers exist?
Exactly 88 in base 10. All are known. The largest has 39 digits: 115132219018763992565095597973971522401.
Why no 2-digit Armstrong numbers?
For 2 digits max sum = 2x9^2 = 162, min 2-digit = 10. But 10^1+0^1=1 not 10. All 2-digit numbers fail because a^2+b^2 can never equal 10a+b.
What is the 39-digit Armstrong number?
115132219018763992565095597973971522401. It is the largest PDI in base 10. Found in 1994 by Hendrik Lenstra. Beyond 39 digits, equality is impossible.

More Number Theory Tools

Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.

© 2026 IP331.com — Free Online Tools. All rights reserved.

About · Contact · Privacy Policy · Cookie Policy · Terms of Use · Disclaimer · Sitemap