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.

A281945 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that both x and x + y - z are powers of two (including 2^0 = 1).

This page as a plain text file.
%I A281945 #12 Feb 03 2017 10:38:55
%S A281945 1,2,2,2,3,4,3,2,4,6,2,3,4,4,4,2,4,8,5,4,4,5,4,4,6,7,5,5,4,7,4,2,8,9,
%T A281945 5,4,6,5,5,6,5,10,5,3,8,7,3,3,8,8,8,6,2,11,8,4,5,9,4,5,7,5,6,2,9,11,
%U A281945 10,5,6,12,3,8,9,6,9,6,4,8,4,4
%N A281945 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that both x and x + y - z are powers of two (including 2^0 = 1).
%C A281945 65213 is the first positive integer which cannot be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that both x and x + y + z are powers of two. Though a(44997) = 0, we have
%C A281945  44997 = 128^2 + (-28)^2 + (-98)^2 + 1^2 with 128 = 2^7 and 128 + (-28) + (-98) = 2^1.
%H A281945 Zhi-Wei Sun, <a href="/A281945/b281945.txt">Table of n, a(n) for n = 1..10000</a>
%H A281945 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 A281945 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1701.05868">Restricted sums of four squares</a>, arXiv:1701.05868 [math.NT], 2017.
%e A281945 a(1) = 1 since 1 = 1^2 + 0^2 + 0^2 + 0^2 with 1 = 2^0 and 1 + 0 - 0 = 2^0.
%e A281945 a(2237) = 1 since 2237 = 8^2 + 29^2 + 36^2 + 6^2 with 8 = 2^3 and 8 + 29 - 36 = 2^0.
%e A281945 a(4397) = 1 since 4397 = 4^2 + 21^2 + 24^2 + 58^2 with 4 = 2^2 and 4 + 21 - 24 = 2^0.
%e A281945 a(5853) = 1 since 5853 = 2^2 + 52^2 + 52^2 + 21^2 with 2 = 2^1 and 2 + 52 - 52 = 2^1.
%e A281945 a(14711) = 1 since 14711 = 1^2 + 18^2 + 15^2 + 119^2 with 1 = 2^0 and 1 + 18 - 15 = 2^2.
%e A281945 a(16797) = 1 since 16797 = 64^2 + 42^2 + 104^2 + 11^2 with 64 = 2^6 and 64 + 42 - 104 = 2^1.
%e A281945 a(17861) = 1 since 17861 = 32^2 + 0^2 + 31^2 + 126^2 with 32 = 2^5 and 32 + 0 - 31 = 2^0.
%e A281945 a(20959) = 1 since 20959 = 2^2 + 109^2 + 95^2 + 7^2 with 2 = 2^1 and 2 + 109 - 95 = 2^4.
%e A281945 a(21799) = 1 since 21799 = 1^2 + 146^2 + 19^2 + 11^2 with 1 = 2^0 and 1 + 146 - 19 = 2^7.
%e A281945 a(24757) = 1 since 24757 = 64^2 + 56^2 + 119^2 + 58^2 with 64 = 2^6 and 64 + 56 - 119 = 2^0.
%e A281945 a(28253) = 1 since 28253 = 2^2 + 3^2 + 4^2 + 168^2 with 2 = 2^1 and 2 + 3 - 4 = 2^0.
%t A281945 SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
%t A281945 Pow[n_]:=Pow[n]=n>0&&IntegerQ[Log[2,n]];
%t A281945 Do[r=0;Do[If[SQ[n-4^x-y^2-z^2]&&Pow[2^x+y-z],r=r+1],{x,0,Log[4,n]},{y,0,Sqrt[n-4^x]},{z,0,Sqrt[n-4^x-y^2]}];Print[n," ",r];Continue,{n,1,80}]
%Y A281945 Cf. A000079, A000118, A000290, A279612, A281939, A281941.
%K A281945 nonn
%O A281945 1,2
%A A281945 _Zhi-Wei Sun_, Feb 02 2017