Special Non-linear recurrence

102 Views Asked by At

Problem I have a non-linear recurrence relation given by

$$ a_n = a_{n-1}+a_{n-2}+a_{n-3} - \sqrt{a_{n-1}.a_{n-2}+a_{n-2}.a_{n-3}+a_{n-3}.a_{n-1}} $$

Given $ a_1, a_2 $ and $ a_3 $,I have to find the nth term of the sequence in $ O(\log n)$ time.

I know if the recurrence dependence is linear then we can solve the problem in logrithmic time (see link) but I don't know for this special case.

Actually my original problem is to find the radius of nth circle, given the radius of first 4 circles, from the figure shown below

Circles

For it I am trying to use Descartes theorem (https://en.wikipedia.org/wiki/Descartes%27_theorem) in the form of the recurrences above.

Please suggest any approach.