# How can I find the formula of a (square root?) function when given the first term of a succession and its n+1 term?

I just got out of high school so please excuse my ignorance

So some days ago I was given the first term of a succession (a1 = -1) and the n+1 term (an+1 = (1/2)an+4) I was curious what the an term is, but I have failed miserably, yet I must know!

This is the graph with the first 10 terms

Looking at them, I was pretty sure it was a square root (looking back, it could be any n root), that f(0)=-1, and that 8 was the upper bound (the supreme?)

With that reasoning I eyeballed a formula that has those 2 qualities but doesn't go through any point (the orange one)

Then, I tried making a formula of the form $$\sqrt{\frac{ax+b}{cx}}-1$$ which went through 3 points (the purple curve), but it missed the others (I used a fraction cause the argument of the root must have a finite limit or else the upper bound of the function won't be 8 and a -1 so that it passes through (0,-1)) I also tried $$a\sqrt{\frac{bx+c}{dx}}-1$$ , $$\sqrt{\frac{ax+b}{cx+d}}-1$$ but ALL failed

Anyways, I don't even know if it's possible, do I have to use matrices? Add more variables? I also thought of taking the derivative and making it so it's limit as it approaches 8 is 0, but I decided to keep my sanity. Thanks for reading

This is an arithmetic-geometric sequence. You can find the general term with a simple method.

First, let's find the fixed point $$l$$ such that $$l=\frac{1}{2} l + 4$$ . We find $$l=8$$.

Then let $$b_n = a_n - l$$ an auxiliary sequence. We show that $$(b_n)$$ is a geometric sequence :

\begin{align} b_{n+1} &= a_{n+1} - l \\ &= \frac{1}{2} a_n + 4 - l \\ &= \frac{1}{2} a_n + 4 - ( \frac{1}{2}l + 4) \\ &= \frac{1}{2} (a_n - l) \\ &= \frac{1}{2} b_n \end{align}

Therefore $$b_n = b_1 (\frac{1}{2})^{n-1} = (a_1-l)(\frac{1}{2})^{n-1}$$

Finally, $$a_n = b_n + l = (a_1-l)(\frac{1}{2})^{n-1} + l = -9(\frac{1}{2})^{n-1} + 8$$

To give a more "high level" comment :

This technique looks like an ununtuitive trick, but if you want to know, this is in fact a particular case of a more general method, where you know how to solve an (homogeneous) equation in a vector space but you have an equation whose solution lies in an affine space (which is roughly a vector space plus a constant term). The idea is to first find a very simple solution which verifies the recurrence equation (here its a constant sequence), then subtract this particular solution $$(l)$$ to the general solution $$(a_n)$$. The result $$(b_n)$$ is a new object which is now in a vector space (here, a geometric sequence which is a linear recurrent sequence of order 1, without additive constant term) and it is much easier to work with $$(b_n)$$ than with $$(a_n$$).

Hint

If the sequence would satisfy the recurrence relation

$$b_{n+1} = \frac{1}{2}b_n,$$ life would be like in paradise. Unfortunately, you're not yet in paradise. However, if you make a transformation like

$$a_n = b_n + c,$$ replace $$a_n$$ and $$a_{n+1}$$ using above relationship, and chose carefully $$c$$, you'll find your way to transform your recurrence relation into one of a geometric sequence... which is almost the paradise.

Here is a variation where we write consecutive elements $$a_k$$ in a way, that most of them cancel. We can write \begin{align*} a_1=-1\qquad\qquad \color{blue}{a_{n+1}}&=\frac{1}{2}a_n\color{blue}{+4}\qquad\qquad\qquad (n\geq 1)\\ \frac{1}{2}a_n&=\frac{1}{2^2}a_{n-1}\color{blue}{+\frac{1}{2}\cdot 4}\\ \frac{1}{2^2}a_{n-1}&=\frac{1}{2^3}a_{n-2}\color{blue}{+\frac{1}{2^2}\cdot 4}\\ &\ \ \,\vdots\\ \frac{1}{2^{n-1}}a_2&\,\,\color{blue}{=\frac{1}{2^n}a_1+\frac{1}{2^{n-1}}\cdot 4}\\ \end{align*}

Adding the equations we see $$a_2,a_3,\ldots,a_n$$ cancel. Since $$a_1=-1$$ we obtain using the geometric sum formula: \begin{align*} \color{blue}{a_{n+1}}&=-\frac{1}{2^n}+\frac{4}{2^{n-1}}\sum_{k=0}^{n-1}2^k\\ &=-\frac{1}{2^n}+\frac{4}{2^{n-1}}\left(2^n-1\right)\\ &=-\frac{1}{2^n}+8-\frac{4}{2^{n-1}}\\ &\,\,\color{blue}{=8-\frac{9}{2^n}\qquad\qquad\qquad(n\geq 0)} \end{align*}