How to effectively solve this expression?
$$\left (2 + 5 \right ) + \left (2^{2}+5^{2} \right ) + \left (2^{3}+5^{3} \right ) + \left (2^{4}+5^{4} \right )$$
Inefficient method:
$$\left (7 \right ) + \left (29 \right ) + \left (133 \right ) + \left (641 \right ) = 810$$
It's $$(2+2^2+2^3+2^4)+(5+5^2+5^3+5^4) = (1+2+ \dots+2^4)+(1+5+ \dots +5^4)-2 =$$ $$=(2^5-1)+ (5^5-1)/4 -2 = 31 + 781 - 2 = 810$$