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 A271626 #18 Apr 11 2016 23:25:50 %S A271626 0,1,8,17,19,27,46,62,91,99,145,152,304,359,472,513,571,684,720,799, %T A271626 913,1204,1232,1413,1771,2599,2907,3059,3509,3769,3887,4158,4507,4787, %U A271626 5071,6209,7399,7739,8059,8486,9566,10709,11545,12139,13284,13573,14607,15417 %N A271626 Numbers n such that the sum of the digits of the numbers from 0 to n is a square. %H A271626 Paolo P. Lava, <a href="/A271626/b271626.txt">Table of n, a(n) for n = 1..500</a> %e A271626 0 = 0^2 and 1 = 1^2; %e A271626 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 36 = 6^2; %e A271626 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 1 + 0 + 1 + 1 + 1 + 2 + 1 + 3 + 1 + 4 + 1 + 5 + 1 + 6 + 1 + 7 = 81 = 9^2. %p A271626 with(numtheory): P:=proc(q) local a,b,c,k,n; a:=0; for n from 0 to q do b:=0; c:=n; %p A271626 for k from 1 to ilog10(n)+1 do b:=b+(c mod 10); c:=trunc(c/10); od; a:=a+b; %p A271626 if a=trunc(sqrt(a))*trunc(sqrt(a)) then print(n); fi; od; end: P(10^6); %t A271626 Select[Range[0, 16000], IntegerQ@ Sqrt@ Total@ Map[Total@ IntegerDigits@ # &, Range[0, #]] &] (* _Michael De Vlieger_, Apr 11 2016 *) %o A271626 (PARI) isok(n) = issquare(sum(k=1, n, sumdigits(k))); \\ _Michel Marcus_, Apr 11 2016 %Y A271626 Cf. A001108, A037123, A271629. %K A271626 nonn,easy,base %O A271626 1,3 %A A271626 _Paolo P. Lava_, Apr 11 2016