login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A300667 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z <= w such that 3*x or y is a square and x + 2*y is also a square. 15

%I #30 Oct 04 2020 23:43:02

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

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

%U 7,7,5,1,3,4,4,4,3,4,3,3,4

%N Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z <= w such that 3*x or y is a square and x + 2*y is also a square.

%C Conjecture 1: a(n) > 0 for all n >= 0, and a(n) = 1 only for n = 16^k*m with k = 0,1,2,... and m = 0, 3, 7, 11, 12, 15, 28, 39, 47, 60, 71, 92, 119, 172, 232, 253, 263, 316, 347, 515.

%C Conjecture 2: Each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 3*x or y is a square and 2*x - y is also a square.

%C By the author's 2017 JNT paper, any nonnegative integer can be written as the sum of a fourth power and three squares.

%C See also A281976, A300666, A300708 and A300712 for similar conjectures.

%C a(n) > 0 for all n = 0..10^8. Also, Conjecture 2 holds for all n = 0..10^8. In a 2018 paper Y.-C. Sun and Z.-W. Sun proved that any nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x + 2*y a square, where x,y,z,w are nonnegative integers. - _Zhi-Wei Sun_, Oct 04 2020

%D Yu-Chen Sun and Zhi-Wei Sun, Some variants of Lagrange's four squares theorem, Acta Arith. 183(2018), 339-356.

%H Zhi-Wei Sun, <a href="/A300667/b300667.txt">Table of n, a(n) for n = 0..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.

%H Yu-Chen Sun and Zhi-Wei Sun, <a href="https://arxiv.org/abs/1605.03074">Some variants of Lagrange's four squares theorem</a, arXiv:1605.03074 [math.NT], 2016-2018.

%e a(12) = 1 since 12 = 0^2 + 2^2 + 2^2 + 2^2 with 3*0 = 0^2 and 0 + 2*2 = 2^2.

%e a(39) = 1 since 39 = 2^2 + 1^2 + 3^2 + 5^2 with 1 = 1^2 and 2 + 2*1 = 2^2.

%e a(172) = 1 since 172 = 7^2 + 1^2 + 1^2 + 11^2 with 1 = 1^2 and 7 + 2*1 = 3^2.

%e a(232) = 1 since 232 = 0^2 + 0^2 + 6^2 + 14^2 with 0 = 0^2 and 0 + 2*0 = 0^2.

%e a(253) = 1 since 253 = 8^2 + 4^2 + 2^2 + 13^2 with 4 = 2^2 and 8 + 2*4 = 4^2.

%e a(263) = 1 since 263 = 3^2 + 3^2 + 7^2 + 14^2 with 3*3 = 3^2 and 3 + 2*3 = 3^2.

%e a(515) = 1 since 515 = 1^2 + 0^2 + 15^2 + 17^2 with 0 = 0^2 and 1 + 2*0 = 1^2.

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

%t tab={};Do[r=0;Do[If[(SQ[3(m^2-2y)]||SQ[y])&&SQ[n-(m^2-2y)^2-y^2-z^2],r=r+1],{m,0,(5n)^(1/4)},{y,0,Min[m^2/2,Sqrt[n]]},{z,0,Sqrt[Max[0,(n-(m^2-2y)^2-y^2)/2]]}];tab=Append[tab,r],{n,0,80}];Print[tab]

%o (PARI) A300667(n)=sum(x=0,sqrtint(n),sum(y=0,sqrtint(n-x^2),if(issquare(x+2*y)&&(issquare(y)||issquare(3*x)),if(n>x^2+y^2,A000161(n-x^2-y^2),1)))) \\ _M. F. Hasler_, Mar 11 2018

%Y Cf. A000118, A000290, A271518, A281976, A300666, A300708, A300712.

%K nonn

%O 0,2

%A _Zhi-Wei Sun_, Mar 10 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 13:08 EDT 2024. Contains 372480 sequences. (Running on oeis4.)