= a · a · a · a · a · b · b · b · b · b

(a·b)·(a·b)

n = 2 (slider from 2 to 5, step 1)
Text1: "(a · b)^{" + (LaTeX[n]) + "}="
Text4: "=a^" + (LaTeX[n]) + "·b^" + (LaTeX[n]) + ""