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