# Fermat to infinity

**Algebra**Level 5

\[\left(1-\frac{1}{a_1}\right)\left(1-\frac{1}{a_2}\right)\left(1-\frac{1}{a_3}\right)\left(1-\frac{1}{a_4}\right) \cdots \]

Let \(a_1=\frac{17}{4}\) and \(a_n=a_{n-1}^2-2\) for \(n \geq 2\).

If the infinite product above can be expressed as \( \frac AB\), where \(A\) and \(B\) are coprime positive integers, then what is the value of \(A+B\)?