On a :
A= 1+(3^1-2^1)+(3²-2²)+(3^3-2^3)+.........+(3^9-2^9)
= 1+3+ 3²+3^3+...+3^9 -2-2²-2^3-...-2^9
=1+3+ 3²+3^3+...+3^9 -1-2-2²-2^3-...-2^9 +1
d'autre part on a:
(1-3)(1+3+3²+...3^9)=1+3+3²+...3^9-3-3²-...-3^9-3^10
=1-3^10
(1-2)(-1-2-2²-...-2^9)=-(1-2)(1+2+2²+....+2^9)
=-(1+2+2²+....+2^9-2-2²-...-2^9-2^10)
= -(1-2^10)
=2^10 -1
donc 1+3+3²+...3^9=( 1-3^10)/(1-3)= (3^10 -1)/2
et -1-2-2²-...-2^9= -(1-2^10)/(1-2)= 1-2^10
Donc A=(3^10 -1)/2+1-2^10 +1