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 A283366 #13 Mar 06 2017 10:38:07 %S A283366 2,4,3,5,4,2,7,5,5,6,3,5,7,8,3,9,7,3,11,1,2,8,9,7,6,2,3,11,7,7,7,7,1, %T A283366 12,7,4,12,6,7,4,8,4,8,7,7,9,3,1,15,8,2,12,4,4,4,8,5,12,11,5,7,6,5,11, %U A283366 2,3,12,12,9,9,9,4,12,8,5,5,7,3,18,8,6 %N A283366 Number of ways to write 2*n + 1 as x^2 + y^2 + 2*z^2 with x,y,z integers such that 2*x + y + z is a square or a power of two. %C A283366 Conjecture: a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 19, 32, 47, 115, 200, 974, 1271, 2240, 2549, 3185, 4865, 9254, 15881. %C A283366 By the Gauss-Legendre theorem, for any nonnegative integer n, we can write 4*n + 2 as u^2 + v^2 + (2*z)^2 with u,v,z integers and u == v (mod 2), and hence 2*n + 1 = x^2 + y^2 + 2*z^2 with x = (u+v)/2 and y = (u-v)/2. %C A283366 The conjecture implies that any positive integer with even 2-adic order can be written as x^2 + y^2 + 2*z^2 with x,y,z integers such that 2*x + y + z is a square or twice a square. %C A283366 See also A283299 for a similar conjecture. %H A283366 Zhi-Wei Sun, <a href="/A283366/b283366.txt">Table of n, a(n) for n = 0..10000</a> %H A283366 Zhi-Wei Sun, <a href="http://dx.doi.org/10.1016/j.jnt.2016.11.008">Refining Lagrange's four-square theorem</a>, J. Number Theory 175(2017), 167-190. %H A283366 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1701.05868">Restricted sums of four squares</a>, arXiv:1701.05868 [math.NT], 2017. %e A283366 a(0) = 2 since 2*0 + 1 = 1^2 + 0^2 + 2*0^2 with 2*1 + 0 + 0 = 2^1, and 2*0 + 1 = 0^2 + 1^2 + 2*0^2 with 2*0 + 1 + 0 = 1^2. %e A283366 a(19) = 1 since 2*19 + 1 = 1^2 + 6^2 + 2*1^2 with 2*1 + 6 + 1 = 3^2. %e A283366 a(32) = 1 since 2*32 + 1 = 4^2 + (-7)^2 + 2*0^2 with 2*4 + (-7) + 0 = 1^2. %e A283366 a(47) = 1 since 2*47 + 1 = 6^2 + (-3)^2 + 2*(-5)^2 with 2*6 + (-3) + (-5) = 2^2. %e A283366 a(115) = 1 since 2*115 + 1 = 10^2 + (-9)^2 + 2*5^2 with 2*10 + (-9) + 5 = 4^2. %e A283366 a(200) = 1 since 2*200 + 1 = (-3)^2 + 0^2 + 2*14^2 with 2*(-3) + 0 + 14 = 2^3. %e A283366 a(974) = 1 since 2*974 + 1 = 26^2 + (-25)^2 + 2*(-18)^2 with 2*26 + (-25) + (-18) = 3^2. %e A283366 a(1271) = 1 since 2*1271 + 1 = 14^2 + 13^2 + 2*(-33)^2 with 2*14 + 13 + (-33) = 2^3. %e A283366 a(2240) = 1 since 2*2240 + 1 = 28^2 + (-13)^2 + 2*(-42)^2 with 2*28 + (-13) + (-42) = 1^2. %e A283366 a(2549) = 1 since 2*2549 + 1 = 59^2 + (-40)^2 + 2*3^2 with 2*59 + (-40) + 3 = 9^2. %e A283366 a(3185) = 1 since 2*3185 + 1 = 33^2 + (-72)^2 + 2*7^2 with 2*33 + (-72) + 7 = 1^2. %e A283366 a(4865) = 1 since 2*4865 + 1 = 72^2 + (-63)^2 + 2*(-17)^2 with 2*72 + (-63) + (-17) = 8^2. %e A283366 a(9254) = 1 since 2*9254 + 1 = 61^2 + 26^2 + 2*(-84)^2 with 2*61 + 26 + (-84) = 8^2. %e A283366 a(15881) = 1 since 2*15881 + 1 = (-48)^2 + 153^2 + 2*(-55)^2 with 2*(-48) + 153 + (-55) = 2^1. %t A283366 SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; %t A283366 Pow[n_]:=Pow[n]=n>0&&IntegerQ[Log[2,n]]; %t A283366 TQ[n_]:=TQ[n]=SQ[n]||Pow[n]; %t A283366 Do[r=0;Do[If[SQ[2n+1-2x^2-y^2]&&TQ[(-1)^i*x+(-1)^j*y+(-1)^k*2*Sqrt[2n+1-2x^2-y^2]],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[2n+1-2x^2]},{i,0,Min[x,1]},{j,0,Min[y,1]},{k,0,Min[Sqrt[2n+1-2x^2-y^2],1]}];Print[n," ",r],{n,0,80}] %Y A283366 Cf. A000079, A000290, A283239, A283269, A283273, A283299. %K A283366 nonn %O A283366 0,1 %A A283366 _Zhi-Wei Sun_, Mar 06 2017