Finding a formula for a recursively defined sequence I have a sequence given by:
\begin{align}
r_1 &= 1\\
r_2 &= 0\\
 r_3 &= -1\\
r_n &= r_{n-1}r_{n-2} + r_{n-3}\\
R &= \{1, 0, -1, 1, -1, -2, 3, -7, -23, etc...\}
\end{align}
The first four lines were all we were given in order to help study for our final tomorrow. I have a feeling one of the questions will be to find a formula but I don't know where to start. Any suggestions?
My first intuition was to start with $x^3 = x^2\ x + 1$ but that leads to $x^3 - x^3 = 1 \rightarrow 0 = 1$
 A: The same recurrence with initial values $b_0=1$, $b_1=1$, and $b_2=0$ is OEIS A$001064$:
$$\langle 1,1,0,1,1,1,2,3,7,23,164,3779,\ldots\rangle$$
Your sequence has initial values $a_0=-1$ (obtained by extrapolating backwards), $a_1=1$, and $a_2=0$ and begins
$$\langle -1,1,0,-1,1,-1,-2,3,-7,-23,164,-3779,\ldots\rangle\;.$$
This clearly suggests that
$$a_n=\begin{cases}
b_n,&\text{if }n\equiv 1\pmod 3\\
-b_n,&\text{otherwise}\;,
\end{cases}$$
and indeed this is easily proved by induction on $n$. The OEIS entry has neither a closed form nor a generating function; this suggests that none is known for the positive sequence, and I’d be very much surprised if your sequence were any better behaved.
A: I've not much time at the moment; but just a first approach if you have no other better idea: write the first few iterates, most explicite, beginning with [a,b,c] and try to discern a pattern. Later I'd look, whether there is some simplification, given the special values from the initial problem (like a pattern in the exponents, sums partial geometric series and the like, products with increasing number of factors...). 
a
b
c

b*c     + a
b*c^2   + a*c + b
b^2*c^3 + 2*b*a*c^2 + (a^2 + (b^2 + 1))*c + b*a

b^3*c^5 + 3*b^2*a*c^4 + (3*b*a^2 + (2*b^3 + b))*c^3 + (a^3 + (4*b^2 + 1)*a)*c^2 + (2*b*a^2 + (b^3 + 2*b))*c + (b^2 + 1)*a
b^5*c^8 + 5*b^4*a*c^7 + (10*b^3*a^2 + (3*b^5 + 2*b^3))*c^6 + (10*b^2*a^3 + (12*b^4 + 6*b^2)*a)*c^5 + (5*b*a^4 + (18*b^3 + 6*b)*a^2 + (3*b^5 + 5*b^3 + b))*c^4 + (a^5 + (12*b^2 + 2)*a^3 + (9*b^4 + 11*b^2 + 1)*a)*c^3 + (3*b*a^4 + (9*b^3 + 7*b)*a^2 + (b^5 + 3*b^3 + 3*b))*c^2 + ((3*b^2 + 1)*a^3 + (2*b^4 + 4*b^2 + 2)*a)*c + ((b^3 + b)*a^2 + b)

A: Some hint can be taken as below 
Let $$ A(X)=\sum_{r=0}^{\infty}a_rX^r$$
So $$ A(X) = a_0+a_1X^1+a_2X^2+a_3X^3 + ....$$
find 
$$ XA(X)$$
$$ X^2A(X)$$
$$X^3A(X)$$
and now use expression
$$r_n=r_{n-1}r_{n-2}+r_{n-3}$$
and 
$$A(X) = X[A(X)-a_0]*x^2[A(X)-a_0-a_1X]+X^3[A(X)-a_0-a_1X-a_2X^2]$$
Solve above equation and find $$A(X)$$ 
find Coefficient of $$X^n\text{    in   } A(X)$$ 
Use given initial condition for finding constant if we got Constant in $$A(X)$$
$$\text{This will be desired solution or    } r_n \text{in the form of }n$$
