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.
%I A185076 #26 Mar 16 2023 17:29:29 %S A185076 0,1,0,10,2,100,11,1000,4,3,6,8,19,35,7,16,34,106,13,41,24,17,37,107, %T A185076 323,43,124,317,67,113,63,114,134,343,83,133,367,1024,167,374,264,314, %U A185076 386,1043,313,583,1303,3283,707,1183,3316,836,1333,3286,10133 %N A185076 a(n) is the least number k such that (sum of digits of k^2) + (number of digits of k^2) = n, or 0 if no such k exists. %C A185076 a(n) < sqrt(10^(n-1)). 0 < a(2m) <= 10^(m-1) with the upper bound reached for 1<=m<=4. - _Chai Wah Wu_, Mar 15 2023 %H A185076 Chai Wah Wu, <a href="/A185076/b185076.txt">Table of n, a(n) for n = 1..185</a> %F A185076 n = A004159(a(n)) + A185679(a(n)). %e A185076 a(7)=11 since 7 = sumdigits(121) + numberdigits(121) = 4 + 3. %t A185076 Table[k=1; While[d=IntegerDigits[k^2]; n>Length[d] && n != Total[d] + Length[d], k++]; If[Length[d] >= n, k=0]; k, {n, 50}] %o A185076 (Python) %o A185076 from itertools import count %o A185076 def A185076(n): %o A185076 for k in count(1): %o A185076 if n == (t:=len(s:=str(k**2)))+sum(map(int,s)): %o A185076 return k %o A185076 if t >= n: %o A185076 return 0 # _Chai Wah Wu_, Mar 15 2023 %Y A185076 Cf. A004159, A185679. %K A185076 nonn,base %O A185076 1,4 %A A185076 _Carmine Suriano_, Feb 23 2011