The q-analog of the binomial theorem (1 - z)^n = 1 - n z + (n(n - 1))/(1·2) z^2 - (n(n - 1)(n - 2))/(1·2·3) z^3 + ... is given by (1 - z/q^n)(1 - z/q^(n - 1))...(1 - z/q) = 1 - (1 - q^n)/(1 - q) z/q^n + (1 - q^n)/(1 - q) (1 - q^(n - 1))/(1 - q^2) z^2/q^(n + (n - 1)) - ... ± z^n/q^(n(n + 1)/2).