OFFSET
1,1
EXAMPLE
a(7) = 157 because among all 7-digit cubes, 157^3=3869893 is the smallest cube (another 2 larger cubes are 199^3=7880599, 208^3=8998912) who has the maximum sum of digits, 46 = A373727(7).
MATHEMATICA
Table[t =SortBy[Map[{#, Total@IntegerDigits[#^3]} &,
Range[Ceiling@CubeRoot[10^(n - 1)], CubeRoot[10^n - 1]]], Last];
Select[t, #[[2]] == t[[-1]][[2]] &][[1, 1]], {n, 18}]
CROSSREFS
KEYWORD
nonn,base,new
AUTHOR
Zhining Yang, Jan 11 2025
STATUS
approved