|
|
A238017
|
|
Least triangular number representable as a sum of n consecutive triangular numbers, or -1 if no such triangular number exists.
|
|
1
|
|
|
0, 1, 10, 10, 55, -1, 210, 120, 120, 1485, 2145, -1, 2080, -1, -1, 56616, 1326, 12561, -1, 1540, 1540, 21736, -1, -1, 52650, 16653, 4950, 26796, 10440, 12880, 7750, -1, -1, 7140, 7140, 154290, -1, 11476, -1, 214840, -1, -1, 207690, 23252790, -1, -1, 6895041, -1, 750925
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|