login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of ways to write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and y even such that x^2 - (6*y)^2 = 4^k for some k = 0,1,2,....
25

%I #13 Mar 20 2018 16:11:18

%S 1,1,2,1,1,2,1,1,4,1,1,2,1,1,2,1,3,4,1,1,8,2,2,2,3,2,6,1,2,2,1,1,11,3,

%T 2,4,4,3,3,1,6,10,6,2,7,2,3,2,6,3,8,2,7,7,2,1,11,4,4,2,2,1,6,1,3,11,3,

%U 3,16,3,5,4,8,5,2,3,11,5,8,1

%N Number of ways to write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and y even such that x^2 - (6*y)^2 = 4^k for some k = 0,1,2,....

%C Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 11, 13, 19, 2^k*m (k = 0,1,2,... and m = 1, 5, 7, 31).

%C We have verified a(n) > 0 for all n = 1..10^7.

%C See also A301376 for a similar conjecture.

%H Zhi-Wei Sun, <a href="/A301391/b301391.txt">Table of n, a(n) for n = 1..10000</a>

%H 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 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1701.05868">Restricted sums of four squares</a>, arXiv:1701.05868 [math.NT], 2017-2018.

%e a(2) = 1 since 2^2 = 2^2 + 0^2 + 0^2 + 0^2 with 2^2 - (6*0)^2 = 4^1.

%e a(5) = 1 since 5^2 = 4^2 + 0^2 + 0^2 + 3^2 with 4^2 - (6*0)^2 = 4^2.

%e a(7) = 1 since 7^2 = 2^2 + 0^2 + 3^2 + 6^2 with 2^2 - (6*0)^2 = 4^1.

%e a(11) = 1 since 11 = 2^2 + 0^2 + 6^2 + 9^2 with 2^2 - (6*0)^2 = 4^1.

%e a(13) = 1 since 13 = 4^2 + 0^2 + 3^2 + 12^2 with 4^2 - (6*0)^2 = 4^2.

%e a(19) = 1 since 19 = 1^2 + 0^2 + 6^2 + 18^2 with 1^2 - (6*0)^2 = 4^0.

%e a(31) = 1 since 31^2 = 20^2 + 2^2 + 14^2 + 19^2 with 20^2 - (6*2)^2 = 4^4.

%e a(75) = 2 since 75^2 = 68^2 + 10^2 + 1^2 + 30^2 = 68^2 + 10^2 + 15^2 + 26^2 with 68^2 - (6*10)^2 = 4^5.

%t f[n_]:=f[n]=FactorInteger[n];

%t g[n_]:=g[n]=Sum[Boole[Mod[Part[Part[f[n],i],1]-3,4]==0&&Mod[Part[Part[f[n],i],2],2]==1],{i,1,Length[f[n]]}]==0;

%t QQ[n_]:=QQ[n]=n==0||(n>0&&g[n]);

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

%t tab={};Do[r=0;Do[If[SQ[4^k+144m^2]&&QQ[n^2-4^k-148m^2], Do[If[SQ[n^2-(4^k+148m^2)-z^2],r=r+1],{z,0,Sqrt[(n^2-4^k-148m^2)/2]}]],{k,0,Log[2,n]},{m,0,Sqrt[(n^2-4^k)/148]}];tab=Append[tab,r],{n,1,80}];Print[tab]

%Y Cf. A000118, A000290, A000302, A299537, A299794, A299924, A300219, A300396, A300441, A300510, A301376.

%K nonn

%O 1,3

%A _Zhi-Wei Sun_, Mar 20 2018