The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A299924 Number of ways to write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x + 2*y + 3*z is a power of 4 (including 4^0 = 1). 36
 1, 1, 1, 1, 3, 4, 1, 1, 2, 2, 1, 2, 1, 1, 3, 1, 1, 11, 4, 6, 7, 7, 8, 4, 4, 6, 14, 4, 6, 17, 10, 1, 10, 6, 10, 7, 4, 4, 16, 2, 3, 10, 2, 1, 9, 6, 3, 2, 1, 5, 2, 3, 7, 9, 3, 1, 6, 2, 3, 7, 1, 4, 4, 1, 3, 4, 3, 1, 13, 20 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 COMMENTS Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 3, 7, 13, 49, 61, 4^k*m (k = 0,1,2,... and m = 1, 2, 11, 14, 17). (ii) Let a,b,c,d be nonnegative integers with a >= b >= c >= d, b positive, and gcd(a,b,c,d) not divisible by 4. Then, any positive square can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that a*x + b*y + c*z + d*w = 4^k for some k = 0,1,2,..., if and only if d = 0 and (a,b,c) is among the following ordered triples: (3,2,1), (2,1,0), (3,1,0), (4,2,0), (8,1,0), (15,1,0) and (16,2,0). By Theorem 1.1(i) of arXiv:1701.05868, any positive square can be written as (4^k)^2 + x^2 + y^2 + z^2 with k,x,y,z nonnegative integers. We have verified that a(n) > 0 for all n = 1..50000. LINKS Zhi-Wei Sun, Table of n, a(n) for n = 1..500 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-2018. EXAMPLE a(1) = 1 since 1^2 = 1^2 + 0^2 + 0^2 + 0^2 with 1 + 2*0 + 3*0 = 4^0. a(2) = 1 since 2^2 = 0^2 + 2^2 + 0^2 + 0^2 with 0 + 2*2 + 3*0 = 4. a(3) = 1 since 3^2 = 2^2 + 1^2 + 0^2 + 2^2 with 2 + 2*1 + 3*0 = 4. a(7) = 1 since 7^2 = 2^2 + 4^2 + 2^2 + 5^2 with 2 + 2*4 + 3*2 = 4^2. a(11) = 1 since 11^2 = 2^2 + 1^2 + 4^2 + 10^2 with 2 + 2*1 + 4*3 = 4^2. a(13) = 1 since 13^2 = 8^2 + 1^2 + 2^2 + 10^2 with 8 + 2*1 + 3*2 = 4^2. a(14) = 1 since 14^2 = 4^2 + 6^2 + 0^2 + 12^2 with 4 + 2*6 + 3*0 = 4^2. a(17) = 1 since 17^2 = 0^2 + 8^2 + 0^2 + 15^2 with 0 + 2*8 + 4*0 = 4^2. a(49) = 1 since 49^2 = 22^2 + 3^2 + 12^2 + 42^2 with 22 + 2*3 + 3*12 = 4^3. a(61) = 1 since 61^2 = 6^2 + 20^2 + 6^2 + 57^2 with 6 + 2*20 + 3*6 = 4^3. MATHEMATICA SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; Pow[n_]:=Pow[n]=IntegerQ[Log[4, n]]; Do[r=0; Do[If[SQ[n^2-x^2-y^2-z^2]&&Pow[x+2y+3z], r=r+1], {x, 0, n}, {y, 0, Sqrt[n^2-x^2]}, {z, 0, Sqrt[n^2-x^2-y^2]}]; Print[n, " ", r], {n, 1, 70}] CROSSREFS Cf. A000118, A000302, A271518, A279612, A281976, A299825, A300219. Sequence in context: A139344 A137925 A171528 * A131107 A046547 A016453 Adjacent sequences:  A299921 A299922 A299923 * A299925 A299926 A299927 KEYWORD nonn AUTHOR Zhi-Wei Sun, Feb 21 2018 STATUS approved

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

Last modified June 5 12:47 EDT 2020. Contains 334840 sequences. (Running on oeis4.)