Let $r>4$ be a positive integer. I want to solve this difference equation:
$$u_{n+1}-r²(1+r²ⁿ⁺¹)u_{n}+r²r²ⁿ⁺¹u_{n-1}-2r²r²ⁿ⁺¹=0$$ but I have no a good idea to start.
Let $r>4$ be a positive integer. I want to solve this difference equation:
$$u_{n+1}-r²(1+r²ⁿ⁺¹)u_{n}+r²r²ⁿ⁺¹u_{n-1}-2r²r²ⁿ⁺¹=0$$ but I have no a good idea to start.
I expanded your recurrence
$$ u_n = \left(r^2 + r^{2n+1}\right) u_{n-1} - \left( r^{2n+1} \right) u_{n-2} + 2r^{2n+1} $$
using Sympy and found a general solution in terms of $u_0$ and $u_1$.
$$ u_n = u_1\, r^{f(n)} + \sum_{k=0}^{n-2} \left[ \left( 2k+2-u_0 \right) r^3 + u_1 \right] r^{f(n)-g(k)} \\ \; \\ \begin{array} ( &f(n) = n^2 + 2n - 3 \\ &g(k) = k^2 + 4k + 3\\ \end{array} $$
which can be proved by induction. However, unless you can simplify this further, it's not much more computationally useful than the recurrence. As an example, here is the expanded form of $u_{10}$ when $u_0=u_1=0$.
$$ u_{10} = 2r^{117} + 4r^{112} + 6r^{105} + 8r^{96} + 10r^{85} + 12r^{72} + 14r^{57} + 16r^{40} + 18r^{21} $$