login
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.
2
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, 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, 2, 3, 12, 12, 9, 9, 9, 4, 12, 8, 5, 5, 7, 3, 18, 8, 6
OFFSET
0,1
COMMENTS
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.
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.
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.
See also A283299 for a similar conjecture.
LINKS
Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190.
Zhi-Wei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017.
EXAMPLE
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.
a(19) = 1 since 2*19 + 1 = 1^2 + 6^2 + 2*1^2 with 2*1 + 6 + 1 = 3^2.
a(32) = 1 since 2*32 + 1 = 4^2 + (-7)^2 + 2*0^2 with 2*4 + (-7) + 0 = 1^2.
a(47) = 1 since 2*47 + 1 = 6^2 + (-3)^2 + 2*(-5)^2 with 2*6 + (-3) + (-5) = 2^2.
a(115) = 1 since 2*115 + 1 = 10^2 + (-9)^2 + 2*5^2 with 2*10 + (-9) + 5 = 4^2.
a(200) = 1 since 2*200 + 1 = (-3)^2 + 0^2 + 2*14^2 with 2*(-3) + 0 + 14 = 2^3.
a(974) = 1 since 2*974 + 1 = 26^2 + (-25)^2 + 2*(-18)^2 with 2*26 + (-25) + (-18) = 3^2.
a(1271) = 1 since 2*1271 + 1 = 14^2 + 13^2 + 2*(-33)^2 with 2*14 + 13 + (-33) = 2^3.
a(2240) = 1 since 2*2240 + 1 = 28^2 + (-13)^2 + 2*(-42)^2 with 2*28 + (-13) + (-42) = 1^2.
a(2549) = 1 since 2*2549 + 1 = 59^2 + (-40)^2 + 2*3^2 with 2*59 + (-40) + 3 = 9^2.
a(3185) = 1 since 2*3185 + 1 = 33^2 + (-72)^2 + 2*7^2 with 2*33 + (-72) + 7 = 1^2.
a(4865) = 1 since 2*4865 + 1 = 72^2 + (-63)^2 + 2*(-17)^2 with 2*72 + (-63) + (-17) = 8^2.
a(9254) = 1 since 2*9254 + 1 = 61^2 + 26^2 + 2*(-84)^2 with 2*61 + 26 + (-84) = 8^2.
a(15881) = 1 since 2*15881 + 1 = (-48)^2 + 153^2 + 2*(-55)^2 with 2*(-48) + 153 + (-55) = 2^1.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
Pow[n_]:=Pow[n]=n>0&&IntegerQ[Log[2, n]];
TQ[n_]:=TQ[n]=SQ[n]||Pow[n];
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}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 06 2017
STATUS
approved