PERFECT R-NARCISSISTIC NUMBERS IN ANY BASE
René-Louis Clerc (january 2024) ((*))

- ABSTRACT - We defined in [3] the perfect r-narcissistic numbers, or rppdi, which are a natural extension of the classic ppdi or Armstrong number of the first kind ([1]). We have shown that the set of these rppdi is finite and we have given the list of the first 15 rppdi greater than 1 in decimal base ([4], [OEIS2]).
Let us now consider the ppdi and the rppdi in any base b; we will thus define two distinct families (ppdib, ppdi0) on the one hand and (rppdib, rppdi0) on the other hand, associated with any base b other than the decimal base.
We will treat here the cases of bases from 3 to 9 (base 2 only has the trivial solution 1 and base 10 corresponds to the classic ppdi and rppdi) without taking into account the common trivial solution 1.

For a k-digit number n, the function Sp(n) will express the sum of the powers p >= 1 of all the digits of n:
n = ∑i=1i=k ai 10k-i, a1 > 0, Sp(n) = ∑i=1i=k aip, p >= 1.
To move on to rppdi, we apply Sp, not to n (as for ppdi), but to a power r (> 1) of n.
Recall that a perfect r-narcissistic number or rppdi ([3], [4]) is an integer n (> 1) with p digits whose power r > 1 (r = 1 corresponding to the classic ppdi) is such that the sum of the powers p of all its digits Sp(nr) is equal to the number n.
While a p-digit ppdi is a solution of n = Sp(n), a p-digit rppdi is a solution of n = Sp(n r) for r > 1.
An rppdi is therefore a p-digit fixed point of the transformation Spr
(1)   n ---> Spr(n) = Sp(nr), r > 1 ,
a ppdi being a fixed point with p digits of (1) but with r = 1.
In any base b (2 < b < 10), n becomes n_b and we apply the transformation Spr to n_b; we then look for fixed points of: n = Spr(n_b), for r = 1 (ppdi) or r > 1 (rppdi).
With p = number of digits of n_b, then denoted pb, we obtain the ppdi in base b or ppdib, and the rppdi in base b or rppdib; in this case it is the number n_b which has p digits.
With p = number of digits of n, then denoted p0, we obtain fixed points of Spr which we will respectively call ppdi0 ( r = 1) and rppdi0 (r > 1); in this case it is the number n which has p digits.
Let us add that for ppdi, only ppdib are considered by the authors ([2], [OEIS1]).
The pleasant character of the transformations Spr ([3], [4]) leads to the finiteness of the sets of integers, {ppdib}, {ppdi0} of a on the other hand, {rppdib}, {rppdi0} on the other hand; the set, also finite ([4]), of all the fixed points of the pleasant transformation Spr, contains the first two for r = 1 and the last two for r > 1.
For finiteness, we can also draw inspiration from the general demonstration of [5], and frame such numbers n with k digits in base b by (since nr < 10kr ):
(2)   bk-1 < n < rk(b-1)k, with r = 1 for ppdi and r > 1 for rppdi,
the lower limit being the smallest k-digit number, the upper limit being the image by Skr of the largest.
We can then easily show that for all b, and all r, there exists a k*(b, r) such that, in (2), the lower limit is strictly greater than the upper limit; there will therefore be no solution for k >= k*(b, r), which ensures the finite nature of all of these numbers for any base (and any finite r).
For example, for rppdib, k*(10,1) = 61, k*(10,2) = 69, ..., k*(10,6) = 81, k*(9,1) = 53, k*(9,2) = 60, k*(9,3) = 64, ..., ,k*(8,2) = 51, ,k*(8,4) = 57, ...
All ppdi as well as all rppdi are finite in number in all bases and the corresponding definition intervals are [1, 10k*(b,r)-1[, b > 2, r > = 1.
The integers common to the two sets {ppdib}, {ppdi0} respectively {rppdib}, {rppdi0}, are n which have exactly the same number of digits in decimal base and in the base b concerned.
To be more readable we will give all our results by expressing them in decimal base.
1 - PPDIs
The ppdi in decimal base ([2]) and in any base in the form of ppdib ([2], [OEIS1]) are well listed in the literature, but not in the version of ppdi0.
Naturally, in decimal base, the ppdib and the ppdi0 are identified with the well-known ppdi: we know ([1]) that there are 88 including: 1, ..., 9, 153, 370, 371, ..., 115132219018763992565095597973971522401.
To simplify the results concerning ppdib, ppdi0 in base b, we do not cite or count trivial solutions 1, 2, ..., b-1.
1 - 1 - The PPDIB
Here p = pb.
This choice is the one adopted in [2] as in [OEIS1].
In [2, 109], the results, written in base 10, provide 96 solutions.
b = 3 has 3 solutions: 5, 8, 17.
b = 4 has 8 solutions: 28, 29, 35, 43, 55, 62, 83, 243.
b = 5 has 12 solutions: 13, 18, 28, 118, 289, 353, 419, 4890, 4891, 9113, 1874374, 338749352.
b = 6 has 12 solutions: 99, 190, 2292, 2293, 2324, 3432, 3433, 6197, 36140, 269458, 391907, 10067135.
b = 7 has 26 solutions: 10, 25, 32, 45, 133, 134, 152, 250, 3190, 3222, 3612, 3613, 4183, 9286, 35411, 191334, 193393, 376889, 535069, 79 4376, 8094840, 10883814 , 16219922, 20496270, 32469576, 34403018.
b = 8 has 21 solutions: 20, 52, 92, 133, 307, 432, 433, 16819, 17864, 17865, 24583, 25639, 212419, 906298, 906426, 938811, 1122179, 20876 46, 3821955, 13606405, 40695508.
b = 9 has 14 solutions: 41, 50, 126, 127, 468, 469, 1824, 8052, 8295, 9857, 1198372, 3357009, 3357010, 6287267.
Example: in base 6, we have 99 = 243_6, p = 3, S3(243) = 2^3+4^3+3^3 = 99.
1 - 2 - The PPDI0
Here p = p0.
This choice is, to our knowledge, not used, but it is nonetheless also natural since it is associated with the number of digits of the initial n (and not of the transformed n_b). We obtain in our search interval, 34 solutions such that n and n_b have the same length, and therefore common to the two sets {ppdib}, {ppdi0}.
In [2, 109], the results, written in base 10, provide 43 solutions.
b = 3 has 0 solution.
b = 4 has 0 solution.
b = 5 has 3 solutions: 13, 18, 118.
b = 6 has 2 solutions: 190, 251.
b = 7 has 8 solutions: 10, 25, 32, 45, 133, 134, 152, 250.
b = 8 has 15 solutions: 20, 52, 133, 307, 432, 433, 16819, 17864, 17865, 24583, 25639, 212419, 1122179, 2087646, 13606405.
b = 9 has 15 solutions: 41, 50, 126, 127, 468, 469, 1824, 65538, 65539, 1198372, 3357009, 3357010, 5300099, 156608073, 156608074.
Example: in base 6, we have 251 = 1055_6, p = 3, S3(1055) = 1^3+5^3+5^3 = 251.
Let us observe that in [2, 109] there are 96 ppdib for 43 ppdi0 ...
Let us state a property common to ppdib and ppdi0 in any base b.
- PROPERTY 1
For any base b, if a fixed point m of Sp(n_b), with p = pb or p0, is a multiple of b, then m + 1 is also the fixed point of this application.
Indeed, if m = 0(b), m_b ends with a 0 (in m_b = ∑i=1i=p ai bp-i we will have ap = 0), and if m is a solution, m + 1 is also a solution since ap will become equal to 1 and will remain so at any power.
Examples: 370, 371 in base 10 for ppdi; 28, 29 in base 4 for ppdib; 156608073, 156608074 in base 9 for ppdi0, ...
2 - RPPDI
In ([3], [4]), the rppdi were defined and the list ([OEI2]) of the first 15 rppdi greater than 1 in decimal base was given (we write 8(3) for solution 8 with r = 3 ):
  7(4), 8(3), 9(2);
  180(6), 205(2);
  38998(2), 45994(2), 89080(2);
  726191(2);
  5540343(3), 7491889(2), 8690141(3);
  167535050(3), 749387107(4);
  9945245922(3).
We will determine here the representatives in base b (2 < b < 10) for the two choices of p.
We will observe that in [2, 109] there are 17 rppdib for 47 rppdi0 ...

2 - 1 - The RPPDIB
With p = pb, the results, written in base 10, give 17 solutions in [2, 109]:
(solution 10 for r = 2 will be noted 10(2))
b = 3 has 1 solution: 10(2)
b = 4 has 0 solution
b = 5 has 1 solution: 6(2)
b = 6 has 1 solution: 30(3)
b = 7 has 2 solutions: 33(2);
  56(3)
b = 8 has 6 solutions: 16(2), 41(2), 129(2), 432(2), 9808(2);
  7(4)
b = 9 has 6 solutions: 42(2), 684(2), 52777(2);
  8(3);
 7(4), 468(4)

Example: 9808 = 23120_8, p = 5, r = 2, 23120^2 = 534534400, S5(534534400) = 5^5+3^5+4^5+5^5+3 ^5+4^5+4^5 = 9808.

2 - 2 - The RPPDI0
With p = p0, the results, written in base 10, give 47 solutions in [2, 109]:
b = 3 has 5 solutions: 4(2), 33(2), 95(2), 5121(2);
 7294(3)
b = 4 has 20 solutions:
  9(2), 33(2), 129(2), 480(2), 640(2), 736(2), 34816(2), 69666(2), 2129920(2), 4259970(2), 134742016(2), 269484546(2), 335028856(2);
  8(3), 20(3), 512(3), 32768(3), 2097152(3), 134217728(3);
  8(9).
b = 5 has 1 solution: 81748(4)
b = 6 has 2 solutions: 90646(2);
  30(3)
b = 7 has 5 solutions: 9(2), 33(2), 9667(2), 68266(2);
  8(3)
b = 8 has 6 solutions: 16(2), 41(2), 129(2), 432(2);
  977797(3);
  7(4)
b = 9 has 8 solutions: 42(2), 684(2), 9778(2), 52777(2), 8767684(2);
  8(3);
  7(4), 468(4).
Example: 9667 = 40120_7, p = 4, r = 2, 40120^2 = 1609614400, S4(1609614400) = 1^4+6^4+9^4+6^4+1 ^4+4^4+4^4 = 9667.
As for the ppdi, the solutions n of the same length as the associated n_b, are common to the two sets {rppdib}, {rppdi0}, there are 13 in our search interval.
The results obtained with our two choices allow us to observe some pathologies.
- PROPERTY 2
1) Among the rppdi0, there exists a solution n with two different r for b = 4: 8(3) and 8(9) (this answers a question implicitly asked in [5] concerning the rppdi in decimal base and the uniqueness of the r of a solution).
2) Among the rppdi0, we have 3 times the solution 33(2): in bases 3, 4 and 7.
3) For the base b = 4, there is no solution of type rppdib but 20 solutions of type rppdi0 in the search interval [2, 109].
Base 4 appears to be the most prolific for rppdi0.
4) The solution n = 8 appears 4 times in the rppdi0 (2 < b < 10) including 3 times with r = 3:
8(3) and 8(9) for b = 4; 8(3) for b = 7; 8(3) for b = 9.
5) Among the rppdib and rppdi0, the solution n = 7 appears twice: with b = 8 and b = 9 and each time with r = 4.
6) The various properties of 8:
8 is equal to the sum of the digits of its cube (512).
8 is equal to the sum of the digits of the cube of its expression in base 4 (which is 8000).
8 is equal to the sum of the digits of the power of 9 of its expression in base 4 (which is 512.109).
8 is equal to the sum of the digits of the power of 3 of its expression in base 7 (which is 1331).
- CONCLUSION
After the finite set of {rppdi} ([3], [4], [5], [OEIS2]) which has, in decimal base, 15 representatives in [2, 1010], we have defined three new finite sets of narcissistic numbers in bases 3 to 9, {ppdi0}, {rppdib} and {rppdi0}. In the interval [2, 109], they have, respectively, 43, 17 and 47 elements that we have determined.

(*)Honorary professor Paul Sabatier University, Toulouse, France, Webmaster of the site SAYRAC .
This article was published in HAL Open Archive on 08/01/2024 ( hal-04376934 ).

REFERENCES
[1] Armstrong numbers of the first kind or ppdi, OEIS A005188 .
[2] O.Cira, F.Smarandache, Various arithmetic functions and their applications, PONS asbl, Bruxelles, 2016.
[3] R.L.Clerc, Les transformations agréables et une nouvelle classe de nombres narcissiques parfaits, p.1-17, ( https://hal.archives-ouvertes.fr/hal-03619147), 2022.
[4] R.L.Clerc, The perfect r-narcissistic numbers, p.1-2, ( https://hal.science/hal-04229895), 2023.
[5] R.L.Clerc, Quelques nombres de Niven-Harshad particuliers, p.1-18, ( https://hal.science/hal-04235744), 2023.
[OEIS1] Armstrong numbers of the first kind in base 9, OEIS A010353 , N.J.A. Sloane, J.Myers; with references to bases 4 to 16, 2009.
[OEIS2] R-narcissistic numbers (rppdi), OEIS A364601 , R.L.Clerc, 2023.