login
Number of ways to write n as x*(3*x+1)/2 + y*(7*y+1)/2 + 2^k, where x and y are integers, and k is a nonnegative integer.
0

%I #10 Apr 18 2021 22:38:52

%S 1,2,2,3,4,6,5,5,6,4,4,5,6,4,4,8,9,6,9,8,8,6,8,7,2,7,6,6,5,7,9,8,7,10,

%T 6,11,9,9,10,6,10,9,10,6,7,10,10,6,7,6,7,7,6,7,6,11,10,9,9,9,10,10,10,

%U 9,7,7,14,8,11,9,13,11,7,13,9,7,10,8,6,7,10,11,4,9,8,12,8,11,12,6,12,11,12,13,7,12,10,11,11,9

%N Number of ways to write n as x*(3*x+1)/2 + y*(7*y+1)/2 + 2^k, where x and y are integers, and k is a nonnegative integer.

%C The author noted that a(n) > 0 for all n = 1..2*10^7. _Giovanni Resta_ found that 8558169401 is the first value of n with a(n) = 0.

%H Zhi-Wei Sun, <a href="https://doi.org/10.1007/s11425-017-9354-4">Universal sums of three quadratic polynomials</a>, Sci. China Math. 63 (2020), 501-520.

%e a(1) = 1 with 1 = 0*(3*0+1)/2 + 0*(7*0+1)/2 + 2^0.

%e a(25) = 2, and 25 = 1*(3*1+1)/2 + 2*(7*2+1)/2 + 2^3 = (-2)*(3*(-2)+1)/2 + 1*(7*1+1)/2 + 2^4.

%t PenQ[n_]:=PenQ[n]=IntegerQ[Sqrt[24n+1]];

%t tab={};Do[r=0;Do[If[PenQ[n-2^k-x(7x+1)/2],r=r+1],{k,0,Log[2,n]},{x,-Floor[(Sqrt[56(n-2^k)+1]+1)/14],(Sqrt[56(n-2^k)+1]-1)/14}];tab=Append[tab,r],{n,1,100}];Print[tab]

%Y Cf. A000079, A001318, A270566, A343397, A343411, A343460.

%K nonn

%O 1,2

%A _Zhi-Wei Sun_, Apr 17 2021