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!)
 A281494 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x + y + z + w = 2^(floor((ord_2(n)+1)/2)), where ord_2(n) is the 2-adic order of n, and x,y,z,w are integers with |x| <= |y| <= |z| <= |w|. 1
 1, 1, 3, 5, 1, 2, 4, 1, 2, 4, 1, 6, 4, 1, 3, 5, 1, 4, 3, 3, 4, 4, 2, 2, 3, 2, 3, 8, 1, 3, 4, 1, 5, 5, 2, 4, 3, 2, 2, 4, 1, 7, 7, 2, 4, 3, 2, 6, 3, 3, 3, 9, 2, 5, 4, 1, 5, 4, 2, 6, 4, 3, 6, 5, 2, 5, 2, 2, 4, 6, 2, 4, 6, 4, 5, 6, 3, 4, 4, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS The author proved in arXiv:1701.05868 that a(n) > 0 for all n > 0. This is stronger than Lagrange's four-square theorem. It seems that a(n) = 1 only for n = 1, 5, 11, 17, 29, 41, 101, 107, 2*4^k and 14*4^k (k = 0,1,2,...). LINKS Zhi-Wei Sun, Table of n, a(n) for n = 1..10000 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(1) = 1 since 1 = 0^2 + 0^2 + 0^2 + 1^2 with 0 + 0 + 0 + 1 = 1 =2^0 = 2^(floor((ord_2(1)+1)/2)). a(2) = 1 since 2 = 0^2 + 0^2 + 1^2 + 1^2 with 0 + 0 + 1 + 1 = 2 = 2^(floor((ord_2(2)+1)/2)). a(5) = 1 since 5 = 0^2 + 0^2 + (-1)^2 + 2^2 with 0 + 0 + (-1) + 2 = 1 = 2^0 = 2^(floor((ord_2(5)+1)/2)). a(6) = 2 since 6 = 0^2 + 1^2 + (-1)^2 + 2^2 = 0^2 + (-1)^2 + 1^2 + 2^2 with 0 + 1 + (-1) + 2 = 0 + (-1) + 1 + 2 = 2 = 2^(floor((ord_2(6)+1)/2)). a(11) = 1 since 11 = 0^2 + (-1)^2 + (-1)^2 + 3^2 with 0 + (-1) + (-1) + 3 = 1 = 2^0 = 2^(floor((ord_2(11)+1)/2)). a(14) = 1 since 14 = 0^2 + 1^2 + (-2)^2 + 3^2 with 0 + 1 + (-2) + 3 = 2 = 2^(floor((ord_2(14)+1)/2)). a(17) = 1 since 17 = 0^2 + 2^2 + 2^2 + (-3)^2 with 0 + 2 + 2 + (-3) = 1 = 2^0 = 2^(floor((ord_2(17)+1)/2)). a(41) = 1 since 41 = 0^2 + 0^2 + (-4)^2 + 5^2 with 0 + 0 + (-4) + 5 = 1 = 2^0 = 2^(floor((ord_2(41)+1)/2)). a(101) = 1 since 101 = 0^2 + (-1)^2 + (-6)^2 + 8^2 with 0 + (-1) + (-6) + 8 = 1 = 2^0 = 2^(floor((ord_2(101)+1)/2)). a(107) = 1 since 107 = (-1)^2 + (-3)^2 + (-4)^2 + 9^2 with (-1) + (-3) + (-4) + 9 = 1 = 2^0 = 2^(floor((ord_2(107)+1)/2)). MATHEMATICA SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; Ord[p_, n_]=Ord[p, n]=IntegerExponent[n, p]; Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&((-1)^i*x+(-1)^j*y+(-1)^k*z+(-1)^s*Sqrt[n-x^2-y^2-z^2]==2^(Floor[(Ord[2, n]+1)/2])), r=r+1], {x, 0, Sqrt[n/4]}, {i, 0, Min[x, 1]}, {y, x, Sqrt[(n-x^2)/3]}, {j, 0, Min[y, 1]}, {z, y, Sqrt[(n-x^2-y^2)/2]}, {k, 0, Min[z, 1]}, {s, 0, Min[Sqrt[n-x^2-y^2-z^2], 1]}]; Print[n, " ", r]; Continue, {n, 1, 80}] CROSSREFS Cf. A000079, A000118, A000290, A272620, A273458. Sequence in context: A190180 A190178 A010261 * A226278 A005699 A127250 Adjacent sequences:  A281491 A281492 A281493 * A281495 A281496 A281497 KEYWORD nonn AUTHOR Zhi-Wei Sun, Jan 22 2017 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 October 26 11:29 EDT 2020. Contains 338027 sequences. (Running on oeis4.)