Question: quick way to test for integer sequences produced by recurrence relation

I have a 3rd order nonlinear recurrence relation and I would like to produce the associated sequence.

Here is the relation x[n+2]:=(((x[n+1]*x[n])^2+x[n]^2+x[n+1]^3))/x[n-1]. At the moment the method I am using (a standard do command) is very computationally heavy when I want lots of iterates. I was wondering if there were faster loops, or procs.

Also I would like some kind of way to check if all the terms are integers, maybe some kind of summation where an integer equals 0 and a non-integer equlas one.

Many thanks


Please Wait...