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.
%I A300510 #56 Jun 14 2019 03:59:39 %S A300510 0,1,2,1,3,3,3,1,4,4,5,3,5,4,6,1,3,4,5,4,7,6,5,3,8,6,6,4,5,7,7,1,5,4, %T A300510 11,4,7,5,6,4,6,8,5,6,12,5,5,3,6,9,8,6,7,6,10,4,7,7,6,7,5,9,9,1,8,5, %U A300510 10,4,9,11,9,4,11,7,12,5,8,7,7,4 %N A300510 Number of ways to write n^2 as 4^k*(m^2+1) + x^2 + y^2, where m is 1 or 2, and k,x,y are nonnegative integers with x <= y. %C A300510 Conjecture: a(n) > 0 for all n > 1; in other words, for any integer n > 1 there is a nonnegative integer k such that either n^2 - 2*4^k or n^2 - 5*4^k can be written as the sum of two squares. Moreover, a(n) = 1 only for n = 2^k with k > 0. %C A300510 This conjecture is stronger than the first conjecture in A300448. We have verified that a(n) > 0 for all n = 2..5*10^7. %C A300510 Consider positive integers c not divisible by 4 such that for any integer n > 1 there is a nonnegative integer k for which n^2 - 2*4^k or n^2 - c*4^k can be written as the sum of two squares. Our computation for n up to 3*10^7 shows that the only candidates for values of c smaller than 160 are 5, 17, 18, 26, 29, 41, 45, 65, 74, 89, 98, 101, 113, 122, 125, 146, 149, 153. These numbers have the form 9^a*(3*b+2) with a and b nonnegative integers and the p-adic order of 3*b+2 is even for any prime p == 3 (mod 4). For n = 42211965 there is no nonnegative integer k such that n^2 - 2*4^k or n^2 - 162*4^k can be written as the sum of two squares. %C A300510 Qing-Hu Hou at Tianjin Univ. reported that he had verified a(n) > 0 for n up to 10^9. - _Zhi-Wei Sun_, Mar 14 2018 %C A300510 Qing-Hu Hou found that 29, 65, 113 should be excluded from the candidates. In fact, for c = 29, 65, 113 there is no nonnegative integer k such that N(c)^2 - 2*4^k or N(c)^2 - c*4^k can be written as the sum of two squares, where N(29) = 51883659, N(65) = 56173837 and N(113) = 65525725. - _Zhi-Wei Sun_, Mar 23 2018 %C A300510 a(n) > 0 for 1 < n < 6*10^9. - _Giovanni Resta_, Jun 14 2019 %H A300510 Zhi-Wei Sun, <a href="/A300510/b300510.txt">Table of n, a(n) for n = 1..10000</a> %H A300510 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 A300510 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 A300510 a(1) = 0 since 1^2 - 4^k*(m^2+1) < 0 for k = 0,1,2,... and m = 1, 2. %e A300510 a(2) = 1 since 2^2 = 4^0*(1^2+1) + 1^2 + 1^2. %e A300510 a(3) = 2 since 3^2 = 4^0*(2^2+1) + 0^2 + 2^2 = 4^1*(1^2+1) + 0^2 + 1^2. %t A300510 f[n_]:=f[n]=FactorInteger[n]; %t A300510 g[n_]:=g[n]=Sum[Boole[Mod[Part[Part[f[n],i],1]-3,4]==0&&Mod[Part[Part[f[n],i],2],2]==1],{i,1,Length[f[n]]}]==0; %t A300510 QQ[n_]:=QQ[n]=n==0||(n>0&&g[n]); %t A300510 SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; %t A300510 tab={};Do[r=0;Do[If[QQ[n^2-4^k*(m^2+1)],Do[If[SQ[n^2-4^k(m^2+1)-x^2],r=r+1],{x,0,Sqrt[(n^2-4^k(m^2+1))/2]}]],{m,1,2},{k,0,Log[4,n^2/(m^2+1)]}];tab=Append[tab,r],{n,1,80}];Print[tab] %Y A300510 Cf. A000118, A000302, A001481, A271518, A281976, A299924, A299537, A299794, A300362, A300396, A300448, A301452, A301471. %K A300510 nonn %O A300510 1,3 %A A300510 _Zhi-Wei Sun_, Mar 07 2018