OFFSET
1,3
EXAMPLE
a(5) = 55 because 55 is the least triangular number representable as a sum of five consecutive triangular numbers: 55 = 3 + 6 + 10 + 15 + 21.
a(7) = 210 because 210 is the least triangular number representable as a sum of seven consecutive triangular numbers: 210 = 10 + 15 + 21 + 28 + 36 + 45 + 55.
10 appears twice because 10 = 1 + 3 + 6 and 10 = 0 + 1 + 3 + 6.
MATHEMATICA
a[1] = 0; a[n_] := Block[{t, x, y, s = Reduce[n*(-1+3*t^2+3*t*n+n^2)/6 == x*(x+1)/2 && x>0 && t >= 0, {t, x}, Integers]}, If[s === False, -1, y = Min[x /. List @ ToRules @ Expand[s /. C[1] -> 1]]; y*(y+1)/2]]; Array[a, 49] (* Giovanni Resta, Mar 02 2014 *)
CROSSREFS
KEYWORD
sign
AUTHOR
Alex Ratushnyak, Feb 17 2014
EXTENSIONS
a(6) and a(12)-a(49) from Jon E. Schoenfield and Giovanni Resta, Mar 04 2014
STATUS
approved