{{Short description|Concept in number theory}} {{About|a type of integers|other uses|Narcissism (disambiguation)}} In number theory, a '''narcissistic number'''<ref name="mw">{{MathWorld |title=Narcissistic Number |urlname=NarcissisticNumber}}</ref><ref name="moore">[http://www.cs.umd.edu/Honors/reports/NarcissisticNums/NarcissisticNums.html ''Perfect and PluPerfect Digital Invariants''] {{webarchive|url=https://web.archive.org/web/20071010035540/http://www.cs.umd.edu/Honors/reports/NarcissisticNums/NarcissisticNums.html |date=2007-10-10 }} by Scott Moore</ref> (also known as a '''pluperfect digital invariant''' ('''PPDI'''),<ref>[https://web.archive.org/web/20091027123639/http://www.geocities.com/~harveyh/narciss.htm PPDI (Armstrong) Numbers] by Harvey Heinz</ref> an '''Armstrong number'''<ref>{{Cite web |title=Armstrong Numbers |url=https://deimel.org/rec_math/dik1.htm |access-date=2025-02-02 |website=deimel.org}}</ref> (after Michael F. Armstrong)<ref>{{Cite web |last=Deimel |first=Lionel |title=Mystery Solved! |url=http://blog.deimel.org/2010/05/mystery-solved.html |access-date=2025-02-02 |language=en}}</ref> or a '''plus perfect number''')<ref>{{OEIS|id=A005188}}</ref> in a given number base <math>b</math> is a number that is the sum of its own digits each raised to the power of the number of digits.
==Definition== Let <math>n</math> be a natural number. We define the '''narcissistic function''' for base <math>b > 1</math> <math>F_{b} : \mathbb{N} \rightarrow \mathbb{N}</math> to be the following: : <math>F_{b}(n) = \sum_{i=0}^{k - 1} d_i^k. </math> where <math>k = \lfloor \log_{b}{n} \rfloor + 1</math> is the number of digits in the number in base <math>b</math>, and : <math>d_i = \frac{n \bmod{b^{i+1}} - n \bmod b^i}{b^i}</math> is the value of each digit of the number. A natural number <math>n</math> is a '''narcissistic number''' if it is a fixed point for <math>F_{b}</math>, which occurs if <math>F_{b}(n) = n</math>. The natural numbers <math>0 \leq n < b</math> are '''trivial narcissistic numbers''' for all <math>b</math>, all other narcissistic numbers are '''nontrivial narcissistic numbers'''.
For example, the number 153 in base <math>b = 10</math> is a narcissistic number, because <math>k = 3</math> and <math>153 = 1^3 + 5^3 + 3^3</math>.
A natural number <math>n</math> is a '''sociable narcissistic number''' if it is a periodic point for <math>F_{b}</math>, where <math>F_{b}^p(n) = n</math> for a positive integer <math>p</math> (here <math>F_{b}^p</math> is the <math>p</math>th iterate of <math>F_b</math>), and forms a cycle of period <math>p</math>. A narcissistic number is a sociable narcissistic number with <math>p = 1</math>, and an '''amicable narcissistic number''' is a sociable narcissistic number with <math>p = 2</math>.
All natural numbers <math>n</math> are preperiodic points for <math>F_{b}</math>, regardless of the base. This is because for any given digit count <math>k</math>, the minimum possible value of <math>n</math> is <math>b^{k - 1}</math>, the maximum possible value of <math>n</math> is <math>b^{k} - 1 \leq b^k</math>, and the narcissistic function value is <math>F_{b}(n) = k(b-1)^k</math>. Thus, any narcissistic number must satisfy the inequality <math>b^{k - 1} \leq k(b-1)^k \leq b^k</math>. Multiplying all sides by <math>\frac{b}{(b - 1)^k}</math>, we get <math>{\left(\frac{b}{b - 1}\right)}^{k} \leq bk \leq b{\left(\frac{b}{b - 1}\right)}^{k}</math>, or equivalently, <math>k \leq {\left(\frac{b}{b - 1}\right)}^{k} \leq bk</math>. Since <math>\frac{b}{b - 1} \geq 1</math>, this means that there will be a maximum value <math>k</math> where <math>{\left(\frac{b}{b - 1}\right)}^{k} \leq bk</math>, because of the exponential nature of <math>{\left(\frac{b}{b - 1}\right)}^{k}</math> and the linearity of <math>bk</math>. Beyond this value <math>k</math>, <math>F_{b}(n) \leq n</math> always. Thus, there are a finite number of narcissistic numbers, and any natural number is guaranteed to reach a periodic point or a fixed point less than <math>b^{k} - 1</math>, making it a preperiodic point. Setting <math>b</math> equal to 10 shows that the largest narcissistic number in base 10 must be less than <math>10^{60}</math>.<ref name="mw" />
The number of iterations <math>i</math> needed for <math>F_{b}^{i}(n)</math> to reach a fixed point is the narcissistic function's persistence of <math>n</math>, and undefined if it never reaches a fixed point.
A base <math>b</math> has at least one two-digit narcissistic number if and only if <math>b^2 + 1</math> is not prime, and the number of two-digit narcissistic numbers in base <math>b</math> equals <math>\tau(b^2+1)-2</math>, where <math>\tau(n)</math> is the number of positive divisors of <math>n</math>.
Every base <math>b \geq 3</math> that is not a multiple of nine has at least one three-digit narcissistic number. The bases that do not are :2, 72, 90, 108, 153, 270, 423, 450, 531, 558, 630, 648, 738, 1044, 1098, 1125, 1224, 1242, 1287, 1440, 1503, 1566, 1611, 1620, 1800, 1935, ... {{OEIS|id=A248970}}
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.<ref name="mw" />
==Narcissistic numbers and cycles of ''F''<sub>''b''</sub> for specific ''b'' == All numbers are represented in base <math>b</math>. '#' is the length of each known finite sequence. {| class="wikitable" ! <math>b</math> ! Narcissistic numbers ! # ! Cycles ! OEIS sequence(s) |--- | 2 || 0, 1 || 2 || <math>\varnothing</math> || |--- | 3 || 0, 1, 2, 12, 22, 122 || 6 || <math>\varnothing</math> || |--- | 4 || 0, 1, 2, 3, 130, 131, 203, 223, 313, 332, 1103, 3303 || 12 || <math>\varnothing</math> || {{OEIS link|id=A010344}} and {{OEIS link|id=A010343}} |--- | 5 || 0, 1, 2, 3, 4, 23, 33, 103, 433, 2124, 2403, 3134, 124030, 124031, 242423, 434434444, ... || 18 || 1234 → 2404 → 4103 → 2323 → 1234
3424 → 4414 → 11034 → 20034 → 20144 → 31311 → 3424
1044302 → 2110314 → 1044302
1043300 → 1131014 → 1043300 || {{OEIS link|id=A010346}} |--- | 6 || 0, 1, 2, 3, 4, 5, 243, 514, 14340, 14341, 14432, 23520, 23521, 44405, 435152, 5435254, 12222215, 555435035 ... || 31 || 44 → 52 → 45 → 105 → 330 → 130 → 44
13345 → 33244 → 15514 → 53404 → 41024 → 13345
14523 → 32253 → 25003 → 23424 → 14523
2245352 → 3431045 → 2245352
12444435 → 22045351 → 30145020 → 13531231 → 12444435
115531430 → 230104215 → 115531430
225435342 → 235501040 → 225435342 || {{OEIS link|id=A010348}} |--- | 7 || 0, 1, 2, 3, 4, 5, 6, 13, 34, 44, 63, 250, 251, 305, 505, 12205, 12252, 13350, 13351, 15124, 36034, 205145, 1424553, 1433554, 3126542, 4355653, 6515652, 125543055, ... || 60 || || {{OEIS link|id=A010350}} |--- | 8 || 0, 1, 2, 3, 4, 5, 6, 7, 24, 64, 134, 205, 463, 660, 661, 40663, 42710, 42711, 60007, 62047, 636703, 3352072, 3352272, ... || 63 || || {{OEIS link|id=A010354}} and {{OEIS link|id=A010351}} |--- | 9 || 0, 1, 2, 3, 4, 5, 6, 7, 8, 45, 55, 150, 151, 570, 571, 2446, 12036, 12336, 14462, 2225764, 6275850, 6275851, 12742452, ... || 59 || || {{OEIS link|id=A010353}} |--- | 10 || 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 8208, 9474, 54748, 92727, 93084, 548834, ... || 88 || || {{OEIS link|id=A005188}} |--- | 11 || 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, 56, 66, 105, 307, 708, 966, A06, A64, 8009, 11720, 11721, 12470, ... || 135 || || {{OEIS link|id=A0161948}} |--- | 12 || 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, 25, A5, 577, 668, A83, 14765, 938A4, 369862, A2394A, ... || 88 || || {{OEIS link|id=A161949}} |--- | 13 || 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, 14, 36, 67, 77, A6, C4, 490, 491, 509, B85, 3964, 22593, 5B350, ... || 202 || || {{OEIS link|id=A0161950}} |--- | 14 || 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, 136, 409, 74AB5, 153A632, ... || 103 || || {{OEIS link|id=A0161951}} |--- | 15 || 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, 78, 88, C3A, D87, 1774, E819, E829, 7995C, 829BB, A36BC, ... || 203 || || {{OEIS link|id=A0161952}} |--- | 16 || 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 156, 173, 208, 248, 285, 4A5, 5B0, 5B1, 60B, 64B, 8C0, 8C1, 99A, AA9, AC3, CA8, E69, EA0, EA1, B8D2, 13579, 2B702, 2B722, 5A07C, 5A47C, C00E0, C00E1, C04E0, C04E1, C60E7, C64E7, C80E0, C80E1, C84E0, C84E1, ... || 294 || || {{OEIS link|id=A161953}} |}
==Extension to negative integers== Narcissistic numbers can be extended to the negative integers by use of a signed-digit representation to represent each integer.
==See also== * Arithmetic dynamics * Dudeney number * Factorion * Happy number * Kaprekar's constant * Kaprekar number * Meertens number * Perfect digit-to-digit invariant * Perfect digital invariant * Sum-product number
==References== {{reflist}} {{refbegin}} * Joseph S. Madachy, ''Mathematics on Vacation'', Thomas Nelson & Sons Ltd. 1966, pages 163-175. * Rose, Colin (2005), ''Radical narcissistic numbers'', Journal of Recreational Mathematics, 33(4), 2004–2005, pages 250-254. * [https://web.archive.org/web/20040606020332/http://mathews-archive.com/digit-related-numbers/pdi.html ''Perfect Digital Invariants''] by Walter Schneider {{refend}}
==External links== * [http://www.deimel.org/rec_math/DI_0.htm Digital Invariants] * [https://web.archive.org/web/20171228054132/https://everything2.net/index.pl?node_id=1407017&displaytype=printable&lastnode_id=1407017 Armstrong Numbers] * [https://web.archive.org/web/20100109234250/http://ftp.cwi.nl/dik/Armstrong Armstrong Numbers in base 2 to 16] * [http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/chap04/arms.html Armstrong numbers between 1-999 calculator] * {{cite web|last=Symonds|first=Ria|title=153 and Narcissistic Numbers|url=https://www.youtube.com/watch?v=4aMtJ-V26Z4 |archive-url=https://ghostarchive.org/varchive/youtube/20211219/4aMtJ-V26Z4 |archive-date=2021-12-19 |url-status=live|work=Numberphile|date=3 January 2012 |publisher=Brady Haran}}{{cbignore}}
{{Classes of natural numbers}}
Category:Arithmetic dynamics Category:Base-dependent integer sequences