Nice solution but here is an alternative: Define Z(n) = x^n +1/(x^n) => Z(0)=2, Z(1)=x+1/x, these have nice recursion formula: Z(n+1)=Z(n)*Z(1)-Z(n-1) (also Z(2n)=Z(n)^2-2). From this Z(7)=Z(1) * (Z(1)^6-7*Z(1)^4+14*Z(1)^2-7) = 3*281 =843=> Z(1)=3; Use recursion from [Z(1)....Z(7)]=[3,7,18,47,123,322,843]. Hence Z(3)+Z(5) = 18+123 = 141