OFFSET
1,2
COMMENTS
Written in base twenty the numbers are: 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G, H, I, J, 60D, 6EA8, 4F100, 4F101, E57CAI, JA8FAB, 9DEC7H2, B86BB0HH.
Sequence is finite. Since k*19^k < 20^(k-1) for k >= 157, all terms must have less than 157 base-20 digits. 20*m is a term if and only if 20*m+1 is a term. - Chai Wah Wu, Apr 20 2022
LINKS
Jinyuan Wang, C program
Jinyuan Wang, Table of base-20 Armstrong numbers
Eric Weisstein's World of Mathematics, Narcissistic Number
EXAMPLE
2413 is in the sequence because 2413 is 60D in base 20 (D stands for 13) and 6^3 + 0^3 + 13^3 = 2413. (The exponent 3 is the number of base-20 digits.)
MATHEMATICA
Select[Range[10^6], # == Total[ IntegerDigits[#, 20]^IntegerLength[#, 20]] &]
PROG
(PARI) isok(m) = my(d=digits(m, 20)); sum(k=1, #d, d[k]^#d) == m; \\ Michel Marcus, Mar 19 2022
(Python)
from itertools import islice, combinations_with_replacement
from sympy.ntheory.factor_ import digits
def A351374_gen(): # generator of terms
for k in range(1, 157):
a = tuple(i**k for i in range(20))
yield from (x[0] for x in sorted(filter(lambda x:x[0] > 0 and tuple(sorted(digits(x[0], 20)[1:])) == x[1], \
((sum(map(lambda y:a[y], b)), b) for b in combinations_with_replacement(range(20), k)))))
CROSSREFS
KEYWORD
nonn,base,fini
AUTHOR
Giovanni Corbelli, Mar 18 2022
EXTENSIONS
a(28)-a(30) from Chai Wah Wu, Apr 20 2022
a(31)-a(33) from Jinyuan Wang, May 05 2025
STATUS
approved
