[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A348300 a(n) is the largest number that is the digit sum of the square of an n-digit number. 7
13, 31, 46, 63, 81, 97, 112, 130, 148, 162, 180, 193, 211, 229, 244, 262, 277, 297, 310, 331, 343, 360, 378, 396 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
18*n-a(n) appears to be nondecreasing. - Chai Wah Wu, Nov 18 2021
According to new data 18*n-a(n) sometimes decreases. - David A. Corneth, Feb 21 2024
a(n) is the digit sum of the square of the last n-digit integer in A067179. - Zhao Hui Du, Mar 04 2024
a(n) appears to be approximately equal to 16.5*n. - Zhining Yang, Mar 12 2024
a(n) modulo 9 is either 0, 1, 4 or 7. - Chai Wah Wu, Apr 04 2024
LINKS
FORMULA
a(n) = Max_{k=10^(n-1)..10^n-1} A004159(k).
EXAMPLE
a(3) = 46 because 46 is the largest digital sum encountered among the squares (that of 937) of all 3-digit numbers. Such maximal digital sum can be achieved by more than one square (squares of 836 and 883 also have digital sum 46). Largest of these is A348303.
MATHEMATICA
Array[Max@ Map[Total@ IntegerDigits[#^2] &, Range[10^(# - 1), 10^# - 1]] &, 8] (* Michael De Vlieger, Oct 12 2021 *)
PROG
(Sage)
def A348300(n):
return max(sum((k^2).digits()) for k in (10^(n-1)..10^n-1))
(Python)
def A348300(n): return max(sum(int(d) for d in str(m**2)) for m in range(10**(n-1), 10**n)) # Chai Wah Wu, Jun 26 2024
CROSSREFS
Sequence in context: A129864 A350409 A080387 * A100589 A111489 A106294
KEYWORD
nonn,base,more
AUTHOR
EXTENSIONS
a(11) from Chai Wah Wu, Nov 18 2021
a(12)-a(13) from Martin Ehrenstein, Nov 20 2021
a(14)-a(24) from Zhao Hui Du, Feb 23 2024
Name edited by Jon E. Schoenfield, Mar 10 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 16:10 EDT 2024. Contains 375517 sequences. (Running on oeis4.)