%I #12 Dec 01 2021 03:56:56
%S 2,4,6,6,8,8,8,8,11,9,11,11,12,8,9,11,15,14,16,16,17,8,10,14,15,12,16,
%T 16,12,7,11,17,22,16,17,18,17,10,16,22,23,15,17,19,17,8,15,23,19,11,
%U 20,23,17,12,17,20,20,14,18,18,13,7,12,21,23,21,25,27,26,11,17,27,25,15,22,24,14,8,17,27,29,20,29,28
%N Number of ways to write n as x^2 + y^k + 2^a + 2^b, where x,y,a,b are nonnegative integers with x >= y and a >= b, and k is either 2 or 3.
%C Conjecture 1: a(n) > 0 for all n >= 2.
%C Below is our weaker version of Conjecture 1.
%C Conjecture 2: Each n = 2,3,... can be written as a sum of two perfect powers (including 0 and 1) and two powers of 2 (including 2^0 = 1).
%C In contrast, R. Crocker proved in 2008 that there are infinitely many positive integers which cannot be written as a sum of two squares and two powers of 2.
%H Zhi-Wei Sun, <a href="/A349787/b349787.txt">Table of n, a(n) for n = 2..10000</a>
%H R. C. Crocker, <a href="https://www.impan.pl/en/publishing-house/journals-and-series/colloquium-mathematicum/all/112/2/87281/on-the-sum-of-two-squares-and-two-powers-of-k">On the sum of two squares and two powers of k</a>, Colloq. Math. 112(2008), 235-267.
%H Dave Platt and Tim Trudgian, <a href="https://arxiv.org/abs/1610.01672">On the sum of two squares and at most two powers of 2</a>, arXiv:1610.01672 [math.NT], 2016.
%e a(2) = 2 with 2 = 0^2 + 0^2 + 2^0 + 2^0 = 0^2 + 0^3 + 2^0 + 2^0.
%e a(535903) > 0 since 535903 = 336^2 + 31^3 + 2^18 + 2^17 with 336 >= 31 and 18 >= 17.
%t PowQ[n_]:=PowQ[n]=IntegerQ[Log[2,n]];
%t tab={};Do[r=0;Do[If[PowQ[n-x^2-y^k-2^a],r=r+1],{x,0,Sqrt[n-2]},{k,2,3},{y,0,Min[x,(n-2-x^2)^(1/k)]},{a,0,Log[2,n-x^2-y^k]-1}];tab=Append[tab,r],{n,2,85}];Print[tab]
%Y Cf. A000079, A000290, A000578, A001597, A002760, A273812, A303363, A303637, A349778.
%K nonn
%O 2,1
%A _Zhi-Wei Sun_, Nov 30 2021
|