cp's OEIS Frontend

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.

A373914 a(n) is the largest digit sum of all n-digit fourth powers.

This page as a plain text file.
%I A373914 #32 Mar 29 2025 00:22:38
%S A373914 1,9,13,19,25,37,43,52,55,70,76,79,85,99,103,108,118,127,135,142,144,
%T A373914 153,171,166,178,181,189,198,205,211,220,232,234,243,252,261,265,274,
%U A373914 279,283,297,298,313,316,325,334,337,346,358
%N A373914 a(n) is the largest digit sum of all n-digit fourth powers.
%H A373914 Kevin Ryde, <a href="/A373914/a373914.c.txt">C Code</a>
%e A373914 a(3) = 13 because 13 is the largest digital sum encountered among all 3-digit fourth powers (attained at both fourth powers: 256, 625).
%t A373914 Table[Max@Map[Total@IntegerDigits[#^4] &, Range[Ceiling[10^((n - 1)/4)], Floor[(10^n-1)^(1/4)]]], {n, 32}]
%o A373914 (PARI) a(n) = my(m=ceil(10^((n-1)/4)), M=sqrtint(sqrtint(10^n))); vecmax(apply(sumdigits, vector(M-m+1, i, (i+m-1)^4))); \\ _Michel Marcus_, Jun 23 2024
%o A373914 (Python)
%o A373914 from sympy import integer_nthroot
%o A373914 def A373914(n): return max(sum(int(d) for d in str(m**4)) for m in range((lambda x:x[0]+(x[1]^1))(integer_nthroot(10**(n-1),4)),1+integer_nthroot(10**n-1,4)[0])) # _Chai Wah Wu_, Jun 26 2024
%o A373914 (C) /* See links. */
%Y A373914 Cf. A055565, A018072, A018074, A380111, A380797.
%Y A373914 Other powers: A371728, A373727, A374025, A373994.
%K A373914 nonn,base,more
%O A373914 1,2
%A A373914 _Zhining Yang_, Jun 22 2024