OFFSET
1,1
LINKS
Kevin Ryde, C Code
EXAMPLE
a(7) = 46 because 46 is the largest digital sum encountered among all 7-digit cubes (attained at 3 cubes: 3869893, 7880599, 8998912).
MATHEMATICA
Table[Max@
Map[Total@IntegerDigits[#^3] &,
Range[Ceiling@CubeRoot[10^(n - 1)], CubeRoot[10^n - 1]]], {n, 15}]
PROG
(Python)
from sympy import integer_nthroot
def A373727(n): return max(sum(int(d) for d in str(m**3)) for m in range(1+integer_nthroot(10**(n-1)-1, 3)[0], 1+integer_nthroot(10**n-1, 3)[0])) # Chai Wah Wu, Jun 26 2024
(C) /* See links. */
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Zhining Yang, Jun 15 2024
STATUS
approved