Posted by Denis Borris on September 10, 2002 at 00:06:49:
In Reply to: Re: Quadratics posted by Joel on September 09, 2002 at 22:21:15:
: : I have a sequence of terms and am required to come up with a function..
: : apparently quadratic.. need help..
: : {1,3,6,10,15,21,28,36,45...}
as Joel said, each is the "sum so far" of numbers from 1 up;
or n(n+1)/2; as example, 21 represents n=6 (the 6th in the series):
so 6(6+1)/2 = 6*7/2 = 21.
To get to your "apparently quadratic":
n(n+1)/2 = 21
n^2 + n = 42
n^2 + n - 42 = 0 (your quadratic)
2n = -1 +- sqrt[1^2 - 4(-42)]
2n = -1 +- sqrt(169)
2n = -1 +- 13
2n = 12 or -14
n = 6 or -7
-7 is impossible, so answer is 6, or the 6th term.
Btw, that series is also known as the "triangular numbers".