A²-b²=(a-b)(a+b)
(3+1)*(3^2+1)*(3^4+1)*(3^8+1)-1/2*3^16 = (3+1)*(3^2+1)*(3^4+1)*(3^8+1) * (3-1)/(3-1) - 1/2 * 3^16 = (3²-1²)*(3^2+1)*(3^4+1)*(3^8+1) /2 - 1/2 * 3^16 = (3⁴-1²)*(3^4+1)*(3^8+1) /2 - 1/2 * 3^16 =(3⁸-1⁸)*(3^8+1) /2 - 1/2 * 3^16 = (3¹⁶-1)/2 - 1/2 * 3^16 = 1/2 * 3¹⁶ - 1/2 - 1/2 * 3¹⁶= -1/2