A371728 a(n) is the largest number that is the digit sum of an n-digit square number.
9, 13, 19, 31, 40, 46, 54, 63, 70, 81, 88, 97, 106, 112, 121, 130, 136, 148, 154, 162, 171, 180, 187, 193, 205, 211, 220, 229, 235, 244, 253, 262, 271, 277, 286, 297, 301, 310, 319, 331, 334, 343, 355, 360, 367, 378, 388, 396
Offset: 1
Examples
a(6) = 46 because 46 is the largest digital sum encountered among all 6-digit squares (698896, 779689, 877969).
Links
- Shouen Wang, Chinese BBS: How many of these A's are there?
Programs
-
Mathematica
Array[Max@Map[Total@IntegerDigits[#^2] &, Range[Floor@Sqrt[10^(#)]], Floor@Sqrt[10^(# + 1) - 1]] &, 15]
Extensions
a(22)-a(48) from Zhao Hui Du, Apr 05 2024
a(49)-a(62) from Zhining Yang, May 08 2024
a(63)-a(64) from Zhining Yang, May 23 2024
Incorrect a(61) and unverified a(49) onward deleted by Zhining Yang, Mar 03 2025
Comments