OFFSET
1,2
COMMENTS
Conjecture: a(n) exists for any n > 0. Moreover, no term a(n) is congruent to 2 or 4 or 7 modulo 10.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..200
Zhi-Wei Sun, Universal sums a*x^2+b*y^2+f(z), a*T_x+b*T_y+f(z) and a*T_x+b*y^2+f(z), arXiv:1502.03056 [math.NT], 2015.
EXAMPLE
a(3) = 10 since 10 is the least positive integer which can be written as the sum of two squares and a positive triangular number in exactly 3 ways. In fact, 10 = 0^2 + 0^2 + 4*5/2 = 0^2 + 2^2 + 3*4/2 = 0^2 + 3^2 + 1*2/2.
MATHEMATICA
TQ[n_]:=n>0&&IntegerQ[Sqrt[8n+1]]
Do[Do[m=0; Label[aa]; m=m+1; r=0; Do[If[TQ[m-x^2-y^2], r=r+1; If[r>n, Goto[aa]]], {x, 0, Sqrt[m/2]}, {y, x, Sqrt[m-x^2]}]; If[r==n, Print[n, " ", m]; Goto[bb],
Goto[aa]]]; Label[bb]; Continue, {n, 1, 60}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 15 2015
STATUS
approved