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.

A272888 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with w*(x^2 + 8*y^2 - z^2) a square, where w,x,y are nonnegative integers and z is a positive integer.

This page as a plain text file.
%I A272888 #13 May 27 2016 21:09:59
%S A272888 1,2,2,1,4,5,1,2,5,5,4,4,5,8,2,2,8,6,4,6,9,5,3,4,5,12,9,1,11,8,4,2,8,
%T A272888 9,8,7,6,12,1,5,14,10,4,8,15,9,3,4,8,14,11,5,11,16,2,6,11,6,11,4,13,
%U A272888 13,1,1,16,17,6,9,13,9,5,7,9,19,12,6,17,8,4,6
%N A272888 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with w*(x^2 + 8*y^2 - z^2) a square, where w,x,y are nonnegative integers and z is a positive integer.
%C A272888 Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 7, 39, 63, 87, 5116, 2^(4k+2)*m (k = 0,1,2,... and m = 1, 7).
%C A272888 See arXiv:1604.06723 for more refinements of Lagrange's four-square theorem.
%H A272888 Zhi-Wei Sun, <a href="/A272888/b272888.txt">Table of n, a(n) for n = 1..10000</a>
%H A272888 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1604.06723">Refining Lagrange's four-square theorem</a>, arXiv:1604.06723 [math.GM], 2016.
%H A272888 Zhi-Wei Sun, <a href="http://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;852b9c4a.1604">Refine Lagrange's four-square theorem</a>, a message to Number Theory List, April 26, 2016.
%e A272888 a(1) = 1 since 1 = 0^2 + 0^2 + 0^2 + 1^2 with 1 > 0 and 0*(0^2 + 8*0^2 - 1^2) = 0^2.
%e A272888 a(4) = 1 since 4 = 0^2 + 0^2 + 0^2 + 2^2 with 2 > 0 and 0*(0^2 + 8*0^2 - 2^2) = 0^2.
%e A272888 a(7) = 1 since 7 = 2^2 + 1^2 + 1^2 + 1^2 with 1 > 0 and 2*(1^2 + 8*1^2 - 1^2) = 4^2.
%e A272888 a(28) = 1 since 28 = 2^2 + 2^2 + 4^2 + 2^2 with 2 > 0 and 2*(2^2 + 8*4^2 - 2^2) = 16^2.
%e A272888 a(39) = 1 since 39 = 1^2 + 3^2 + 2^2 + 5^2 with 5 > 0 and 1*(3^2 + 8*2^2 - 5^2) = 4^2.
%e A272888 a(63) = 1 since 63 = 2^2 + 5^2 + 3^2 + 5^2 with 5 > 0 and 2*(5^2 + 8*3^2 - 5^2) = 12^2.
%e A272888 a(87) = 1 since 87 = 2^2 + 1^2 + 9^2 + 1^2 with 1 > 0 and 2*(1^2 + 8*9^2 - 1^2) = 36^2.
%e A272888 a(5116) = 1 since 5116 = 65^2 + 9^2 + 9^2 + 27^2 with 27 > 0 and 65*(9^2 + 8*9^2 - 27^2) = 0^2.
%p A272888 N:= 1000; # to get a(1)..a(N)
%p A272888 A:= Vector(N):
%p A272888 for z from 1 to floor(sqrt(N)) do
%p A272888   for x from 0 to floor(sqrt(N-z^2)) do
%p A272888     for y from 0 to floor(sqrt(N-z^2-x^2)) do
%p A272888       q:= x^2 + 8*y^2 - z^2;
%p A272888       if q < 0 then
%p A272888         A[x^2+y^2+z^2]:= A[x^2+y^2+z^2]+1
%p A272888       elif q = 0 then
%p A272888         for w from 0 to floor(sqrt(N-z^2-x^2-y^2)) do
%p A272888            m:= w^2 + x^2 + y^2 + z^2;
%p A272888            A[m]:= A[m]+1;
%p A272888         od
%p A272888       else
%p A272888         wm:= mul(`if`(t[2]::odd, t[1], 1), t=isqrfree(q)[2]);
%p A272888         for j from 0 to floor((N-z^2-x^2-y^2)^(1/4)/sqrt(wm)) do
%p A272888            m:= (wm*j^2)^2 + x^2 + y^2 + z^2;
%p A272888            A[m]:= A[m]+1;
%p A272888         od;
%p A272888       fi
%p A272888     od
%p A272888   od
%p A272888 od:
%p A272888 convert(A,list); # _Robert Israel_, May 27 2016
%t A272888 SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
%t A272888 Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[Sqrt[n-x^2-y^2-z^2](x^2+8y^2-z^2)],r=r+1],{x,0,Sqrt[n-1]},{y,0,Sqrt[n-1-x^2]},{z,1,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,1,80}]
%Y A272888 Cf. A000118, A000290, A260625, A261876, A262357, A267121, A268197, A268507, A269400, A270073, A271510, A271513, A271518, A271608, A271665, A271714, A271721, A271724, A271775, A271778, A271824, A272084, A272332, A272351, A272620.
%K A272888 nonn
%O A272888 1,2
%A A272888 _Zhi-Wei Sun_, May 08 2016
%E A272888 _Rick L. Shepherd_, May 27 2016: I checked all the statements in each example.