a^3+b^3
=(a+b)(a^2-ab+b^2)
=(a+b)(a^2+2ab+b^2-3ab)
=(a+b)[(a+b)^2-3ab]
=3*(3^2-3*1)
=18
a^4+b^4
=(a^2+b^2)^2-2a^2b^2
=[(a^2+b^2+2ab)-2ab]^2-2(ab)^2
=[(a+b)^2-2ab]^2--2(ab)^2
=[3^2-2*1]^2-2*1^2
=49-2
=47
a^7+b^7
=(a^3+b^3)*(a^4+b^4)-(a^3b^4+a^4b^3)
=(a^3+b^3)*(a^4+b^4)-a^3b^3(a+b)
= (a^3+b^3)*(a^4+b^4)-(ab)^3(a+b)
=18*47-1^3*3
=846-3
=843