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.

A301471 Number of ways to write n^2 as x^2 + 2*y^2 + 3*2^z with x,y,z nonnegative integers.

This page as a plain text file.
%I A301471 #51 Apr 17 2018 16:02:57
%S A301471 0,1,2,1,3,4,3,1,5,4,4,4,5,4,10,1,4,7,4,4,10,4,3,4,6,6,11,4,7,10,6,1,
%T A301471 9,5,7,7,7,6,12,4,6,12,7,4,14,4,8,4,3,8,10,6,8,13,6,4,16,8,7,10,7,6,
%U A301471 14,1,7,11,6,5,16,9,5,7,7,7,18,6,7,14,6,4
%N A301471 Number of ways to write n^2 as x^2 + 2*y^2 + 3*2^z with x,y,z nonnegative integers.
%C A301471 Square Conjecture: a(n) > 0 for all n > 1. Moreover, for any integer n > 3 we can write n^2 as x^2 + 2*y^2 + 3*2^z, where x,y,z are nonnegative integers with y even and z > 1.
%C A301471 It is known that a positive integer n has the form x^2 + 2*y^2 with x and y integers if and only if the p-adic order of n is even for any prime p == 5 or 7 (mod 8).
%C A301471 See also A301472 for the list of positive integers not of the form x^2 + 2*y^2 + 3*2^z with x,y,z nonnegative integers.
%C A301471 If n^2 = x^2 + 2*y^2 + 3*2^z with x,y,z nonnegative integers, then it is easy to see that x is not divisible by 3.
%C A301471 The Square Conjecture implies that for each n = 1,2,3,... we can write 3*n^2 as x^2 + 2*y^2 + 2^z with x,y,z nonnegative integers. In fact, if (3*n)^2 = u^2 + 2*v^2 + 3*2^z with u,v,z integers and z >= 0, then u^2 == v^2 (mod 3) and thus we may assume u == v (mod 3) without loss of generality, hence 3*n^2 = (u^2+2*v^2)/3 + 2^z = x^2 + 2*y^2 + 2^z with x = (u+2*v)/3 and y = (u-v)/3 integers.
%C A301471 On March 25, 2018 Qing-Hu Hou at Tianjin Univ. finished his verification of the Square Conjecture for n <= 4*10^8. Then I used Hou's program to verify the conjecture for n <= 5*10^9. - _Zhi-Wei Sun_, Apr 10 2018
%C A301471 I have found a counterexample to the Square Conjecture, namely a(5884015571) = 0. Note that 5884015571 is the product of the three primes 7, 17 and 49445509. - _Zhi-Wei Sun_, Apr 15 2018
%H A301471 Zhi-Wei Sun, <a href="/A301471/b301471.txt">Table of n, a(n) for n = 1..10000</a>
%H A301471 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 A301471 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 A301471 a(2) = 1 with 2^2 = 1^2 + 2*0^2 + 3*2^0.
%e A301471 a(3) = 2 with 3^2 = 2^2 + 2*1^2 + 3*2^0 = 1^2 + 2*1^2 + 3*2^1.
%e A301471 a(4) = 1 with 4^2 = 2^2 + 2*0^2 + 3*2^2.
%e A301471 a(1131599953) = 1 with 1131599953^2 = 316124933^2 + 2*768304458^2 + 3*2^6.
%e A301471 a(5884015571) = 0 since there are no nonnegative integers x,y,z such that  x^2 + 2*y^2 + 3*2^z = 5884015571^2.
%t A301471 f[n_]:=f[n]=FactorInteger[n];
%t A301471 g[n_]:=g[n]=Sum[Boole[(Mod[Part[Part[f[n],i],1],8]==5||Mod[Part[Part[f[n],i],1],8]==7)&&Mod[Part[Part[f[n],i],2],2]==1],{i,1,Length[f[n]]}]==0;
%t A301471 QQ[n_]:=QQ[n]=(n==0)||(n>0&&g[n]);
%t A301471 SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
%t A301471 tab={};Do[r=0;Do[If[QQ[n^2-3*2^k],Do[If[SQ[n^2-3*2^k-2x^2],r=r+1],{x,0,Sqrt[(n^2-3*2^k)/2]}]],{k,0,Log[2,n^2/3]}];tab=Append[tab,r],{n,1,80}];Print[tab]
%Y A301471 Cf. A000079, A000290, A002479, A299924, A299537, A299794, A300219, A300362, A300396, A300510, A301376, A301391, A301452, A301472, A301479, A301579, A301640, A302641.
%K A301471 nonn
%O A301471 1,3
%A A301471 _Zhi-Wei Sun_, Mar 21 2018