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.

A370522 a(n) is the least n-digit number whose square has the maximum sum of digits (A348300(n)).

This page as a plain text file.
%I A370522 #49 Aug 19 2025 08:44:25
%S A370522 7,83,836,8937,94863,987917,9893887,99477133,994927133,9380293167,
%T A370522 99497231067,926174913167,9892825177313,89324067192437,
%U A370522 943291047332683,9949874270443813,83066231922477313,707106074079263583,9429681807356492126,94180040294109027313,888142995231510436417,8882505274864168010583
%N A370522 a(n) is the least n-digit number whose square has the maximum sum of digits (A348300(n)).
%C A370522 a(n) is the last n-digit term in A067179.
%C A370522 As the last two of the only nine known numbers whose square has a digit mean above 8.25 (see A164841), there is a high probability that a(30)=314610537013606681884298837387 and a(31)=9984988582817657883693383344833.
%H A370522 Zhining Yang, <a href="/A370522/b370522.txt">Table of n, a(n) for n = 1..24</a> (terms 11..24 from Zhao Hui Du)
%e A370522 a(3) = 836 because among all 3-digit numbers, 836 is the smallest whose square 698896 has the maximum sum of digits, 46 = A348300(3).
%t A370522 A348300={13,31,46,63,81,97,112,130,148,162,180};
%t A370522 A370522[n_]:=Do[If[Total@IntegerDigits[k^2]==A348300[[n]],Return[k];],{k,10^(n-1),10^n-1}];
%t A370522 Table[A370522[n],{n,8}]
%o A370522 (Python)
%o A370522 def A370522(n):
%o A370522     A348300=[0,13,31,46,63,81,97,112,130,148,162,180]
%o A370522     for k in range(10**(n-1), 10**n):
%o A370522         if sum(int(d) for d in str(k**2))==A348300[n]:
%o A370522             return(k)
%o A370522 print([A370522(n) for n in range(1,9)])
%Y A370522 Cf. A004159, A067179, A348300, A348303.
%K A370522 nonn,base,changed
%O A370522 1,1
%A A370522 _Zhining Yang_, Feb 21 2024
%E A370522 a(11)-a(24) from _Zhao Hui Du_, Feb 23 2024