A349787 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.
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, 16, 12, 7, 11, 17, 22, 16, 17, 18, 17, 10, 16, 22, 23, 15, 17, 19, 17, 8, 15, 23, 19, 11, 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
Offset: 2
Keywords
Examples
a(2) = 2 with 2 = 0^2 + 0^2 + 2^0 + 2^0 = 0^2 + 0^3 + 2^0 + 2^0. a(535903) > 0 since 535903 = 336^2 + 31^3 + 2^18 + 2^17 with 336 >= 31 and 18 >= 17.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 2..10000
- R. C. Crocker, On the sum of two squares and two powers of k, Colloq. Math. 112(2008), 235-267.
- Dave Platt and Tim Trudgian, On the sum of two squares and at most two powers of 2, arXiv:1610.01672 [math.NT], 2016.
Programs
-
Mathematica
PowQ[n_]:=PowQ[n]=IntegerQ[Log[2,n]]; 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]
Comments