Finding nth term for a recursive/iterative/term to term sequence

I have the sequence: 1, 16, 166, 1666 . Im trying to find the nth term for this sequence but since it is not linear or geometric I'm not sure how to. I worked out that the recursive formula is: $$\begin{gather} a_1 = 1 \\ a_{n + 1} = 10a_{n} + 6 \end{gather}$$ I'm trying to write this as an nth term and I saw that one solution was: $$\begin{gather} \frac{1}{6}\left ( 10 ^{n}-4\right ) \end{gather}$$ But I don't know how to derive this. I have seen other answers on this site but the explanations arent often very clear or involve math that is beyond my ability. For reference I am a high schooler in my final year, if anyone is familiar with the British Education system I am studying further maths for a level so I don't know any math more complex than that. Thank you

• Why need a formula. It's clearly $1\underbrace{666...6}_{n-1}$. Why do you mean algebraic formula. But... I'll post and answer. Feb 14 at 9:42
• Hint: show that $(u_n+2/3)_n$ is geometric. Feb 14 at 9:49

$$a_n = 1\underbrace{6666...6}_{n-1}=$$

$$1\underbrace{0000.....0}_{n-1} + \underbrace{666...6}_{n-1} =$$

$$10^{n-1} + 6\cdot \underbrace{111....1}_{n-1} =$$

$$10^{n-1} + 6\cdot \frac {\underbrace{9999....9}_{n-1}}9 =$$

$$10^{n-1} + 6\cdot \frac {10^{n-1} -1}9=$$

$$10^{n-1} + \frac 23(10^{n-1} -1) =$$

$$\frac {3\cdot 10^{n-1} +2\cdot 10^{n-1} - 2}3=$$

$$\frac {5\cdot 10^{n-1} -2}3$$.

......

ALteratively:

$$a_n = 1\underbrace{6666...6}_{n-1}$$

$$3a_n = 4\underbrace{99999...9}_{n-2}8=$$

$$5\underbrace{00000.....0}_{n-1} - 2$$

$$5\cdot 10^{n-1} -2$$

So $$a_n = \frac {5\cdot 10^{n-1} -2}3$$

Observe that $$1/6= 0.1666\dots$$ and $$a_n = 10^n(0.1666\dots - \varepsilon_n)$$, where $$\varepsilon_n = 10^{-n}\cdot 0.666 \dots$$. Since $$\varepsilon_n$$ is geometric for every $$n$$, you can have a closed expression which is $$\varepsilon_n = 10^{-n} \cdot \dfrac{4}6.$$ Hence, $$a_n = \dfrac{1}{6} \bigg(10^n - 4\bigg).$$

The Online Encyclopedia of Integer Sequences A246057 shows$$\quad a(n) = (5\times10^n - 2)/3$$

It generates $$\\ 16\quad 166\quad 1666\quad 16666\quad 166666\quad 1666666\quad 16666666\quad 166666666\quad \cdots$$

Working backwards, we see that all of these number resemble $$x+\dfrac23$$ so we can try $$3\times 16=48\qquad 3\times 166=498\qquad 3\times1666=4998 \quad\cdots\quad$$

and we can see that each is $$2$$ short of $$5\times10^n.\quad$$ From here it should be easy to see how the formula was developed and how it works.