cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A299537 Number of ways to write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z <= w such that x or y is a power of 4 (including 4^0 = 1) and x + 3*y is also a power of 4.

This page as a plain text file.
%I A299537 #27 Mar 04 2018 19:44:36
%S A299537 1,1,1,1,1,4,1,1,4,3,1,1,2,6,1,1,2,3,1,1,8,6,2,4,3,8,3,1,6,8,4,1,6,10,
%T A299537 3,4,2,5,6,3,4,8,1,1,7,5,1,1,5,6,4,2,4,13,5,6,7,5,5,1,3,7,2,1,3,12,6,
%U A299537 2,11,5,5,3,7,11,2,1,6,13,5,1
%N A299537 Number of ways to write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z <= w such that x or y is a power of 4 (including 4^0 = 1) and x + 3*y is also a power of 4.
%C A299537 Conjecture (i): a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*m with k = 0,1,2,... and m = 1, 2, 3, 5, 7, 11, 15, 19, 43, 47, 135, 1103.
%C A299537 Conjecture (ii): For any integer n > 1, we can write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2*x or 2*y is a power of 4 and 2*(x+3*y) is also a power of 4.
%C A299537 Note that 81503^2 cannot be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and both x and x + 3*y in the set {4^k: k = 0,1,2,...}. However, 81503^2 = 16372^2 + 4^2 + 52372^2 + 60265^2 with 4 = 4^1 and 16372 + 3*4 = 4^7.
%C A299537 We have verified that the conjecture for n up to 10^7.
%C A299537 See also the related comments in A300219 and A300360, and a similar conjecture in A299794.
%H A299537 Zhi-Wei Sun, <a href="/A299537/b299537.txt">Table of n, a(n) for n = 1..2000</a>
%H A299537 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 A299537 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 A299537 a(2) = 1 since 2^2 = 1^2 + 1^2 + 1^2 + 1^2 with 1 = 4^0 and 1 + 3*1 = 4^1.
%e A299537 a(5) = 1 since 5^2 = 4^2 + 0^2 + 0^2 + 3^2 with 4 = 4^1 and 4 + 3*0 = 4^1.
%e A299537 a(19) = 1 since 19^2 = 1^2 + 0^2 + 6^2 + 18^2 with 1 = 4^0 and 1 + 3*0 = 4^0.
%e A299537 a(43) = 1 since 43^2 = 4^2 + 20^2 + 8^2 + 37^2 with 4 = 4^1 and 4 + 3*20 = 4^3.
%e A299537 a(135) = 1 since 135^2 = 16^2 + 16^2 + 17^2 + 132^2 with 16 = 4^2 and 16 + 3*16 = 4^3.
%e A299537 a(1103) = 1 since 1103^2 = 4^2 + 4^2 + 716^2 + 839^2 with 4 = 4^1 and 4 + 3*4 = 4^2.
%t A299537 SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
%t A299537 Pow[n_]:=Pow[n]=IntegerQ[Log[4,n]];
%t A299537 tab={};Do[r=0;Do[If[(Pow[y]||Pow[4^k-3y])&&SQ[n^2-y^2-(4^k-3y)^2-z^2],r=r+1],{k,0,Log[4,Sqrt[10]*n]},{y,0,Min[n,4^k/3]},{z,0,Sqrt[Max[0,(n^2-y^2-(4^k-3y)^2)/2]]}];tab=Append[tab,r],{n,1,80}];Print[tab]
%Y A299537 Cf. A000118, A000290, A000302, A271518, A279612, A281976, A299794, A299924, A300219, A300360, A300362.
%K A299537 nonn
%O A299537 1,6
%A A299537 _Zhi-Wei Sun_, Mar 04 2018