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.

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

This page as a plain text file.
%I A299794 #27 Mar 05 2018 08:27:14
%S A299794 1,1,1,1,1,3,1,1,4,2,1,1,2,3,1,1,2,2,1,1,6,3,1,3,3,2,2,1,3,4,2,1,5,4,
%T A299794 4,5,1,2,3,2,5,5,2,2,8,2,2,1,5,2,4,3,4,4,4,3,6,3,2,3,3,4,3,1,3,6,4,3,
%U A299794 11,2,2,2,4,5,1,2,3,5,3,1
%N A299794 Number of ways to write n^2 as x^2 + y^2 + z^2 + w^2 with x >= y >= 0 <= z <= w such that x or 2*y is a power of 4 (including 4^0 = 1) and x + 15*y is also a power of 4.
%C A299794 Conjecture 1: a(n) > 0 for all n > 0. Also, for any integer n > 1 we can write n^2 as x^2 + y^2 + z^2 + w^2 with x >= y >= 0 <= z <= w such that 2*x or y is a power of 4 and also x + 15*y = 2^(2k+1) for some k = 0,1,2,....
%C A299794 Conjecture 2: Let d be 2 or 8, and let r be 0 or 1. Then any positive square n^2 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x or y is a power of 2 and x + d*y = 2^(2k+r) for some k = 0,1,2,....
%C A299794 We have verified Conjecture 1 for n up to 10^7.
%C A299794 See also A299537, A300219 and A300396 for similar conjectures.
%H A299794 Zhi-Wei Sun, <a href="/A299794/b299794.txt">Table of n, a(n) for n = 1..10000</a>
%H A299794 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 A299794 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 A299794 a(2) = 1 since 2^2 = 1^2 + 1^2 + 1^2 + 1^2 with 1 = 4^0 and 1 + 15*1 = 4^2.
%e A299794 a(5) = 1 since 5^2 = 4^2 + 0^2 + 0^2 + 3^2 with 4 = 4^1 and 4 + 15*0 = 4^1.
%e A299794 a(19) = 1 since 19^2 = 1^2 + 0^2 + 6^2 + 18^2 with 1 = 4^0 and 1 + 15*0 = 4^0.
%e A299794 a(159) = 1 since 159^2 = 34^2 + 2^2 + 75^2 + 136^2 with 2*2 = 4^1 and 34 + 15*2 = 4^3.
%e A299794 a(1998) = 1 since 1998^2 = 256^2 + 256^2 + 286^2 + 1944^2 with 256 = 4^4 and 256 + 15*256 = 4^6.
%e A299794 a(3742) = 1 since 3742^2 = 2176^2 + 128^2 + 98^2 + 3040^2 with 2*128 = 4^4 and 2176 + 15*128 = 4^6.
%t A299794 SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
%t A299794 Pow[n_]:=Pow[n]=IntegerQ[Log[4,n]];
%t A299794 tab={};Do[r=0;Do[If[Pow[2y]||Pow[4^k-15y],Do[If[SQ[n^2-y^2-(4^k-15y)^2-z^2],r=r+1],{z,0,Sqrt[Max[0,(n^2-y^2-(4^k-15y)^2)/2]]}]],
%t A299794 {k,0,Log[4,Sqrt[226]*n]},{y,0,Min[n,4^(k-2)]}];tab=Append[tab,r],{n,1,80}];Print[tab]
%Y A299794 Cf. A000118, A000290, A000302, A271518, A281976, A299537, A299924, A300219, A300356, A300360, A300362, A300396.
%K A299794 nonn
%O A299794 1,6
%A A299794 _Zhi-Wei Sun_, Mar 04 2018