This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A374025 #24 Jun 27 2024 14:13:56 %S A374025 1,5,9,27,27,36,45,46,52,63,72,80,89,90,99,104,108,119,126,143,137, %T A374025 152,157,162,175,180,182,189,198,208,209,216,225,234,236,250,253,270, %U A374025 270,284,286,288,297,310,315,323,324,334,341,346,351,364 %N A374025 a(n) is the largest digit sum of all n-digit fifth powers. %e A374025 a(5) = 27 because 27 is the largest digital sum encountered among all 5-digit fifth powers (16807, 32768, 59049). %t A374025 Table[Max@Map[Total@IntegerDigits[#^5] &, Range[Ceiling[10^((n - 1)/5)], Floor[(10^n-1)^(1/5)]]], {n, 40}] %o A374025 (Python) %o A374025 from sympy import integer_nthroot %o A374025 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 %Y A374025 Cf. A055566, A018141, A018143, A348300, A373727, A373914. %K A374025 nonn,base,more %O A374025 1,2 %A A374025 _Zhining Yang_, Jun 25 2024 %E A374025 a(41)-a(49) from _Chai Wah Wu_, Jun 26 2024 %E A374025 a(50)-a(52) from _Chai Wah Wu_, Jun 27 2024