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 A218706 #10 Nov 06 2012 18:17:23 %S A218706 1,2,5,9,12,19,27,33,42,54,66,77,91,105,120,138,156,175,197,218,240, %T A218706 263,287,314,339,367,398,430,459,493,526,556,595,637,670,709,752,794, %U A218706 833,878,921,965,1018,1065,1112,1163,1215,1266,1317,1370,1433,1492,1544 %N A218706 Number of nonnegative integer solutions to x^2 + 2y^2 <= n^2. %e A218706 There are 5 solutions for n=2, namely (0,0), (0,1), (1,1), (1,0) and (2,0), so a(2) = 5. %t A218706 nn = 50; t = Sort[Select[Flatten[Table[x^2 + 2*y^2, {x, 0, nn}, {y, 0, nn}]], # <= nn^2 &]]; Table[Count[t, _?(# <= n^2 &)], {n, 0, nn}] (* _T. D. Noe_, Nov 06 2012 *) %o A218706 (JavaScript) %o A218706 for (i=0;i<50;i++) { %o A218706 c=0; %o A218706 for (a=0;a<=i;a++) %o A218706 for (b=0;b<=i;b++) %o A218706 if (Math.pow(a,2)+2*Math.pow(b,2)<=Math.pow(i,2)) c++; %o A218706 document.write(c+", "); %o A218706 } %Y A218706 Cf. A000603, A218799. %K A218706 nonn %O A218706 0,2 %A A218706 _Jon Perry_, Nov 04 2012