If $\frac{\sqrt{31+\sqrt{31+\sqrt{31+ \cdots}}}}{\sqrt{1+\sqrt{1+ \sqrt{1+ \cdots}}}}=a-\sqrt b$, find the value of $a+b$ 
$\frac{\sqrt{31+\sqrt{31+\sqrt{31+ \cdots}}}}{\sqrt{1+\sqrt{1+ \sqrt{1+ \cdots}}}}=a-\sqrt b$ where $a,b$ are natural numbers. Find the value of $a+b$. 

I am not able to proceed with solving this question as I have no idea as to how I can calculate $\frac{\sqrt{31+\sqrt{31+\sqrt{31+ \cdots}}}}{\sqrt{1+\sqrt{1+ \sqrt{1+ \cdots}}}}$. A small hint would do.

√(31+√(31+√(31....))) = s
s = √(31+s)
s² = s+31
s = (5√5 + 1)/2 (by the quadratic formula)
√(1+√(1+√(1....))) = k
k = √(1+k)
k² = k+1
k = (√5 + 1)/2 (by the quadratic formula)
s/k = (5√5 + 1)/(√5 + 1)
= (5√5 + 1)(√5 - 1)/4 (multiplying the numerator and denominator both by conjugate √5 - 1)
= (24-4√5)/4
= 6-√5
Since 6 - √5 = a - √b,
a = 6, b = 5
a + b = 11
Thus, the answer is 11.
