login
Number of ways to write n as w + x^2 + 2*y^2 + 3*z^2 + x*y*z, where w is 0 or 1, and x,y,z are nonnegative integers.
4

%I #21 Mar 13 2022 03:00:49

%S 1,2,2,3,4,3,2,3,3,3,2,3,6,4,3,2,2,5,5,5,4,3,4,2,1,5,5,4,6,5,3,3,4,5,

%T 4,5,7,5,4,5,4,3,3,3,4,3,3,5,6,7,6,5,7,6,4,4,4,7,5,4,4,3,7,5,4,5,5,8,

%U 6,2,2,2,4,6,4,6,10,11,6,2,5,7,7,7,8,5,3,3,2,4,4,7,7,4,6,6,4,7,8,7,7

%N Number of ways to write n as w + x^2 + 2*y^2 + 3*z^2 + x*y*z, where w is 0 or 1, and x,y,z are nonnegative integers.

%C Conjecture 1: a(n) = 0 only for n = 106, 744, 5469, 331269. Thus, for any nonnegative integer n not among 106, 744, 5469 and 331269, either n or n - 1 can be written as x^2 + 2*y^2 + 3*z^2 + x*y*z with x,y,z nonnegative integers.

%C Conjecture 2: a(n) = 1 only for n = 0, 24, 346, 360, 664, 667, 1725, 2589, 3111, 4906, 5035, 8043, 8709, 16810, 18699, 34539, 39256, 51621, 59019, 62799, 108645, 136167, 562696.

%C We have verified Conjectures 1 and 2 for n = 0..10^6.

%H Zhi-Wei Sun, <a href="/A352286/b352286.txt">Table of n, a(n) for n = 0..10000</a>

%e a(24) = 1 with 24 = 0 + 4^2 + 2*2^2 + 3*0^2 + 4*2*0.

%e a(346) = 1 with 346 = 1 + 15^2 + 2*3^2 + 3*2^2 + 15*3*2.

%e a(360) = 1 with 360 = 1 + 9^2 + 2*5^2 + 3*4^2 + 9*5*4.

%e a(62799) = 1 with 62799 = 1 + 16^2 + 2*169^2 + 3*2^2 + 16*169*2.

%e a(108645) = 1 with 108645 = 0 + 95^2 + 2*163^2 + 3*3^2 + 95*163*3.

%e a(136167) = 1 with 136167 = 0 + 2^2 + 2*17^2 + 3*207^2 + 2*17*207.

%e a(562696) = 1 with 562696 = 0 + 539^2 + 2*20^2 + 3*25^2 + 539*20*25.

%t SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];

%t tab={};Do[r=0;Do[If[SQ[4(n-w-2y^2-3z^2)+y^2*z^2],r=r+1],{w,0,Min[1,n]},{z,0,Sqrt[(n-w)/3]},{y,0,Sqrt[(n-w-3z^2)/2]}];tab=Append[tab,r],{n,0,100}];Print[tab]

%Y Cf. A000290, A351617, A351723, A351902, A352259.

%K nonn

%O 0,2

%A _Zhi-Wei Sun_, Mar 10 2022