OFFSET
1,4
COMMENTS
Recall an observation of Euler: {w^2 + x*(x+1): w,x = 0,1,2,...} = {a*(a+1)/2 + b*(b+1)/2: a,b = 0,1,...}.
Conjecture: a(n) > 0 for all n > 0. Equivalently, each n = 1,2,3,... can be written as a*(a+1)/2 + b*(b+1)/2 + 4^c*5^d with a,b,c,d nonnegative integers.
See also A308584 for a similar conjecture.
We have verified a(n) > 0 for all n = 1..5*10^8.
a(n) > 0 for 0 < n < 10^10. - Giovanni Resta, Jun 08 2019
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Mixed sums of squares and triangular numbers, Acta Arith. 127(2007), 103-113.
EXAMPLE
a(1) = 1 with 1 = 0^2 + 0*1 + 4^0*5^0.
a(2) = 1 with 2 = 1^2 + 0*1 + 4^0*5^0.
a(3) = 1 with 3 = 0^2 + 1*2 + 4^0*5^0.
a(9) = 1 with 9 = 2^2 + 0*1 + 4^0*5^1.
a(303) = 1 with 303 = 16^2 + 6*7 + 4^0*5^1.
a(585) = 1 with 585 = 5^2 + 15*16 + 4^3*5^1.
a(37863) = 2 with 37863 = 166^2 + 101*102 + 4^0*5^1 = 179^2 + 26*27 + 4^5*5^1.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
tab={}; Do[r=0; Do[If[SQ[n-4^k*5^m-x(x+1)], r=r+1], {k, 0, Log[4, n]}, {m, 0, Log[5, n/4^k]}, {x, 0, (Sqrt[4(n-4^k*5^m)+1]-1)/2}]; tab=Append[tab, r], {n, 1, 100}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jun 07 2019
STATUS
approved