Algebra Level 5

\large { \begin{aligned} A&=& \sum_{n=1}^{50} \left(x^n+\frac1{x^n} \right) \\ B&=&\sum_{n=1}^{10} \left(x^{5n-2}+\frac1{x^{5n-2}} \right) \end{aligned}}

Given that $x + \frac1x =4$, with $A$ and $B$ as described above, find the value of $\dfrac AB$.

×