login
A343503
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
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, 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, 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
OFFSET
1,2
COMMENTS
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.
LINKS
Zhi-Wei Sun, Universal sums of three quadratic polynomials, Sci. China Math. 63 (2020), 501-520.
EXAMPLE
a(1) = 1 with 1 = 0*(3*0+1)/2 + 0*(7*0+1)/2 + 2^0.
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.
MATHEMATICA
PenQ[n_]:=PenQ[n]=IntegerQ[Sqrt[24n+1]];
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]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Apr 17 2021
STATUS
approved