[Math] Finding the $n$th term of sequence of $3, 10, 31, 94, 283$…

sequences-and-series

How do you work out the nth term of a sequence that's neither arithmetic or geometric where two operations are used to get from one term to the next? For example, the sequence $3, 10, 31, 94, 283$ where each term is the last term multiply $3$ plus $1$. (i.e $u_1 = 3$ and $u_{n+1} = 3u_n + 1$). Then is there a way to generalise it where $u_1 = a$ and $u_{n+1} = bu_n + c$?

This problem was part of a question on the Oxford MAT. I've tried to find common differences, substitute terms and many other methods. Also, I found that this problem fits in an area of maths called recurrence relations but the Wikipedia page was far too confusing for me since I'm only year 11 (grade 10), so it didn't help answer my question. I wonder if there's a simpler explanation for this problem. Thanks in advance

Best Answer

There's a nice trick for recursive sequences of this type, where $u_{n+1}$ is a linear function of $u_n$: find a constant $r$ such that $u_{n+1}-r$ is a constant multiple of $u_n-r$. In this case, the multiplication factor in the linear function is $3$, so we're searching for an $r$ with $u_{n+1}-r = 3(u_n-r)$. Solving for $r$: \begin{align*} u_{n+1}-r &= 3(u_n-r) \\ (3u_n+1)-r &= 3u_n-3r \\ 1+2r &= 0 \\ r &= -\tfrac12. \end{align*}

Why does this help us? Because $u_{n+1}+\frac12 = 3(u_n+\frac12)$, it's easy to prove by induction that $u_n+\frac12 = 3^{n-1}(u_1+\frac12)$ for all $n\ge1$. (In other words, this slightly shifted version of the sequence really is geometric.) Solving for $u_n$: \begin{align*} u_n+\tfrac12 &= 3^{n-1}(u_1+\tfrac12) \\ u_n &= 3^{n-1}(3+\tfrac12)-\tfrac12 \\ u_n &= \tfrac12(7\cdot3^{n-1}-1). \end{align*} (Of course there's some formula we could memorize that gives the answer immediately, which is fine ... but it's always best to know how such formulas are derived in the first place.)