OFFSET
1,2
EXAMPLE
a(5) = 27 because 27 is the largest digital sum encountered among all 5-digit fifth powers (16807, 32768, 59049).
MATHEMATICA
Table[Max@Map[Total@IntegerDigits[#^5] &, Range[Ceiling[10^((n - 1)/5)], Floor[(10^n-1)^(1/5)]]], {n, 40}]
PROG
(Python)
from sympy import integer_nthroot
def A374025(n): return max(sum(int(d) for d in str(m**5)) for m in range((lambda x:x[0]+(x[1]^1))(integer_nthroot(10**(n-1), 5)), 1+integer_nthroot(10**n-1, 5)[0])) # Chai Wah Wu, Jun 26 2024
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Zhining Yang, Jun 25 2024
EXTENSIONS
a(41)-a(49) from Chai Wah Wu, Jun 26 2024
a(50)-a(52) from Chai Wah Wu, Jun 27 2024
STATUS
approved