# Narcissistic number

In recreational number theory, a narcissistic number[1][2] (also known as a pluperfect digital invariant (PPDI),[3] an Armstrong number[4] (after Michael F. Armstrong)[5] or a plus perfect number)[6] is a number that is the sum of its own digits each raised to the power of the number of digits. This definition depends on the base b of the number system used, e.g. b = 10 for the decimal system or b = 2 for the binary system.

## Definition

The definition of a narcissistic number relies on the decimal representation n = dkdk-1...d1 of a natural number n, i.e.

n = dk·10k-1 + dk-1·10k-2 + ... + d2·10 + d1,

with k digits di satisfying 0 ≤ di ≤ 9. Such a number n is called narcissistic if it satisfies the condition

n = dkk + dk-1k + ... + d2k + d1k.

For example the 3-digit decimal number 153 is a narcissistic number because 153 = 13 + 53 + 33.

Narcissistic numbers can also be defined with respect to numeral systems with a base b other than b = 10. The base-b representation of a natural number n is defined by

n = dkbk-1 + dk-1bk-2 + ... + d2b + d1,

where the base-b digits di satisfy the condition 0 ≤ di ≤ b-1. For example the (decimal) number 17 is a narcissistic number with respect to the numeral system with base b = 3. Its three base-3 digits are 122, because 17 = 1·32 + 2·3 + 2 , and it satisfies the equation 17 = 13 + 23 + 23.

If the constraint that the power must equal the number of digits is dropped, so that for some m possibly different from k it happens that

n = dkm + dk-1m + ... + d2m + d1m,

then n is called a perfect digital invariant or PDI.[7][2] For example, the decimal number 4150 has four decimal digits and is the sum of the fifth powers of its decimal digits

4150 = 45 + 15 + 55 + 05,

so it is a perfect digital invariant but not a narcissistic number.

In "A Mathematician's Apology", G. H. Hardy wrote:

There are just four numbers, after unity, which are the sums of the cubes of their digits:
$153=1^3+5^3+3^3$
$370=3^3+7^3+0^3$
$371=3^3+7^3+1^3$
$407=4^3+0^3+7^3$.
These are odd facts, very suitable for puzzle columns and likely to amuse amateurs, but there is nothing in them which appeals to the mathematician.

## Formula

Jose de Jesus Camacho Medina developed a formula that allows you to check if a number is narcissistic. [8]

## Narcissistic numbers in various bases

The sequence of "base 10" narcissistic numbers starts: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 8208, 9474 ... (sequence A005188 in OEIS)

The sequence of "base 3" narcissistic numbers starts: 0, 1, 2, 12, 22, 122

The sequence of "base 4" narcissistic numbers starts: 0, 1, 2, 3, 130, 131, 203, 223, 313

The number of narcissistic numbers in a given base is finite, since the maximum possible sum of the kth powers of a k digit number in base b is

$k(b-1)^k\, ,$

and if k is large enough then

$k(b-1)^k

in which case no base b narcissistic number can have k or more digits. Setting b equal to 10 shows that the largest narcissistic number in base 10 must be less than 1060.[1]

There are only 88 narcissistic numbers in base 10, of which the largest is

115,132,219,018,763,992,565,095,597,973,971,522,401

with 39 digits.[1]

Unlike narcissistic numbers, no upper bound can be determined for the size of PDIs in a given base, and it is not currently known whether or not the number of PDIs for an arbitrary base is finite or infinite.[2]

## Related concepts

The term "narcissistic number" is sometimes used in a wider sense to mean a number that is equal to any mathematical manipulation of its own digits. With this wider definition narcisstic numbers include:

• Constant base numbers : $n=m^{d_k} + m^{d_{k-1}} + \dots + m^{d_2} + m^{d_1}$ for some m.
• Perfect digit-to-digit invariants (sequence A046253 in OEIS) : $n = d_k^{d_k} + d_{k-1}^{d_{k-1}} + \dots + d_2^{d_2} + d_1^{d_1}\, ,\text{ e.g. } 3435 = 3^3 + 4^4 + 3^3 + 5^5\, .$
• Ascending power numbers (sequence A032799 in OEIS) : $n = d_k^1 + d_{k-1}^2 + \dots + d_2^{k-1} + d_1^k\, ,\text{ e.g. } 135 = 1^1 + 3^2 + 5^3 \, .$
• Friedman numbers (sequence A036057 in OEIS).
• Radical narcissistic numbers (sequence A119710 in OEIS) [9] ${ e.g. } 729 = (7+2)^{\sqrt{9}}, \text{ }4096=\sqrt{\sqrt{\sqrt{\sqrt{4}+0}}}^{96}$
• Pretty wild narcissistic numbers [10]
• Sum-product numbers (sequence A038369 in OEIS) : $n=\left(\sum_{i=1}^{k}{d_i}\right) \left(\prod_{i=1}^{k}{d_i}\right) \, ,\text{ e.g. } 144 = (1+4+4) \times (1 \times4 \times 4) \, .$
• Dudeney numbers (sequence A061209 in OEIS) :$n=\left(\sum_{i=1}^{k}{d_i}\right)^3\, ,\text{ e.g. } 512 = (5+1+2)^3 \, .$
• Factorions (sequence A014080 in OEIS) :$n=\sum_{i=1}^{k}{d_i}!\, ,\text{ e.g. } 145 = 1! + 4! + 5! \, .$

where di are the digits of n in some base.

## References

1. ^ a b c
2. ^ a b c Perfect and PluPerfect Digital Invariants by Scott Moore
3. ^ PPDI (Armstrong) Numbers by Harvey Heinz
4. ^ Armstrong Numbersl by Dik T. Winter
5. ^ Lionel Deimel’s Web Log
6. ^ (sequence A005188 in OEIS)
7. ^ PDIs by Harvey Heinz
8. ^ Armstrong (or Plus Perfect, or narcissistic) numbers: n-digit numbers equal to sum of n-th powers of their digits by N. J. A. Sloane, Robert G. Wilson
9. ^ Rose, Colin (2005), Radical Narcissistic Numbers, Journal of Recreational Mathematics, 33(4), pages 250-254.
10. ^ Pretty wild narcissistic numbers - numbers that pwn by Colin Rose