OFFSET
1,2
COMMENTS
Recall an observation of Euler: {a*(a+1)/2 + b*(b+1)/2: a,b = 0,1,...} = {x^2 + y*(y+1): x,y = 0,1,...}.
Conjecture: a(n) > 0 for all n > 0. Moreover, any integer n > 1 can be written as a*(a+1)/2 + b*(b+1)/2 + 2^c*5^d, where a,b,c,d are nonnegative integers with c > 0 and d < 2.
We have verified this for n up to 5*10^8.
Since 2^(k+1) = 2^k + 2^k and 5 = 2^2 + 2^0. the above conjecture implies the conjecture in A303233.
On my request, Giovanni Resta found that a(n) = 0 for n = 1217712376, 4371119377. Thus the conjecture fails. - Zhi-Wei Sun, Jun 10 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*1/2 + 0*1/2 + 2^0*5^0.
a(3) = 2 with 3 = 0*1/2 + 1*2/2 + 2^1*5^0 = 1*2/2 + 1*2/2 + 2^0*5^0.
MATHEMATICA
TQ[n_]:=TQ[n]=IntegerQ[Sqrt[8n+1]];
tab={}; Do[r=0; Do[If[TQ[n-5^k*2^m-x(x+1)/2], r=r+1], {k, 0, Min[1, Log[5, n]]}, {m, 0, Log[2, n/5^k]}, {x, 0, (Sqrt[4(n-5^k*2^m)+1]-1)/2}]; tab=Append[tab, r], {n, 1, 100}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jun 09 2019
STATUS
approved