what is the next number in the sequence 1,3,7,13,21...
MathBot Answer:
$$1,3,7,13,21,...$$The next term in this quadratic sequence is $a_{6}=31$.
The nth term in this sequence is given by the formula:
Explicit Formula: $$a_n=n^{2} - n + 1$$
Recursive Formula: $$a_n=a_{n-1} + 2 n - 2, \text{where } a_{1}=1$$
$$\begin{matrix}1&&3&&7&&13&&21\\[6pt]&+2&&+4&&+6&&+8\\[6pt]&&+2&&+2&&+2\\[6pt]\end{matrix}$$
Explicit Formula
Since there are 2 rows of differences, the formula for the sequence can be written as a polynomial with degree 2, where $n$ is the term number and $(x_{0}, x_{1}, x_{2})$ are the coefficients: $$a_n=n^{2} x_{2} + n x_{1} + x_{0}$$
Using the first 3 terms in the sequence, create and solve the system of equations for $(x_{0}, x_{1}, x_{2})$: $$\begin{aligned} 1 &= 1^{2} x_{2} + 1 x_{1} + x_{0} \\ 3 &= 2^{2} x_{2} + 2 x_{1} + x_{0} \\ 7 &= 3^{2} x_{2} + 3 x_{1} + x_{0} \end{aligned} \quad \Rightarrow \quad \begin{aligned} x_{0} + x_{1} + x_{2} = 1\\x_{0} + 2 x_{1} + 4 x_{2} = 3\\x_{0} + 3 x_{1} + 9 x_{2} = 7 \end{aligned}$$ $$ \Rightarrow \quad (x_{0}, x_{1}, x_{2})=\left( 1, \ -1, \ 1\right) $$
The nth term rule is:$$\begin{aligned} a_n&=n^{2} x_{2} + n x_{1} + x_{0} \\ &=n^{2} \left(1\right) + n \left(-1\right) + \left(1\right) \\ &=n^{2} - n + 1 \end{aligned}$$
Recursive Formula
Since there are 2 rows of differences, the formula for the sequence can be written as the sum of $a_{n-1}$ and polynomial with degree 1, where $n$ is the term number and $(x_{0}, x_{1})$ are the coefficients: $$a_n=a_{n-1} + n x_{1} + x_{0}$$
Using the first 3 terms in the sequence, create and solve the system of equations for $(x_{0}, x_{1})$: $$\begin{aligned} 3 &= 1 + 2 x_{1} + x_{0} \\ 7 &= 3 + 3 x_{1} + x_{0} \end{aligned} \quad \Rightarrow \quad \begin{aligned} x_{0} + 2 x_{1} = 2\\x_{0} + 3 x_{1} = 4 \end{aligned}$$ $$ \Rightarrow \quad (x_{0}, x_{1})=\left( -2, \ 2\right) $$
The nth term rule is:$$\begin{aligned} a_n&=a_{n-1} + n x_{1} + x_{0} \\ &=a_{n-1} + n \left(2\right) + \left(-2\right) \\ &=a_{n-1} + 2 n - 2 \end{aligned}$$