Is there a general formula for the sum of a quadratic sequence?

Yes there is. Ever wonder why this is called quadratic sequence? Quadratic refers to squares right? This is just constant difference of difference. So where's the connection? Well as it turns out, all terms of a quadratic sequence are expressible by a quadratic polynomial. What do I mean? Consider this

$$ t_n = n+n^2 $$

Subsituiting $n=1,2,3,\cdots$ generates your terms. By the way, $202$ doesn't occur in this sequence, the 13th term is $182$ and the $14th$ term is $210$. I am assuming it was supposed to be $210$.

So we need to find

$$ \sum_{i=1}^{n}i+i^2 = \sum_{i=1}^{n}i+\sum_{i=1}^{n}i^2 $$

where $n=14$. There are well known formulas for $\sum_{i=1}^{n}i$ and for $\sum_{i=1}^{n}i^2$. Substituting them, we get,

$$\frac{n(n+1)}{2} + \frac{n(n+1)(2n+1)}{6}$$ $$=\frac{n(n+1)}{2}\left(1+\frac{2n+1}{3}\right)$$ $$=\frac{n(n+1)}{2}\left(\frac{3+2n+1}{3}\right)$$ $$=\frac{n(n+1)}{2}\left(\frac{2n+4}{3}\right)$$ $$=\frac{n(n+1)(n+2)}{3}$$

where $n=14$. Thus our sum is $1120$.


For the general case, N terms are to be summed

$$S=a_0+a_1+a_2+...+a_{N-1}$$

The formula for the n-th term is $$a_n=a_0+(a_1-a_0)n+(a_2-2a_1+a_0)\frac{n(n-1)}{2}$$

Using the results

$$ \sum_{n=0}^{N-1}n=\frac{N(N-1)}{2}$$

and

$$ \sum_{n=0}^{N-1}n(n-1)=\frac{N(N-1)(N-2)}{3}$$

leads to

$$S=\sum_{n=0}^{N-1}a_n=a_0N+(a_1-a_0)\frac{N(N-1)}{2}+(a_2-2a_1+a_0)\frac{N(N-1)(N-2)}{6}$$


Although this may not be needed as of now; but I thought about sums of quadratic sequences myself and I managed to derive a general formula for it, so I might as well post it here:

Where is the number of terms to compute, is the starting term, is the first difference and is the constant difference between the differences. I use the subscript to denote that it is the quadratic sequence sum function.