Solve recursion

72 Views Asked by At

$a_n=n^2\times a_{(n-1)}$, for $ n>0, a_0=1$

Whats the correct formula to use in this case?

I solved problem with recursion before, but they had '$+$' instead of $'\times'$ so there is following formula to simply solve them: $ar^n+bnr^n$.

Is there something similar, but for multiplication instead?

2

There are 2 best solutions below

1
On

$a_n=(n!)^2$ using induction. Try to evaluate the first few terms on your own.

0
On

Multiply these lines together: \begin{align} a_n&=n^2\times a_{n-1}\\ a_{n-1}&=(n-1)^2\times a_{n-2}\\ &\dots\\ a_2&=2^2\times a_{1}\\ a_1&=1^2\times a_{0}\\ \end{align} After canceling, we get $$ a_n = 1^2 \cdot 2^2 \cdots n^2 a_0 = (1 \cdot 2 \cdots n)^2 = (n!)^2 $$