Which of the following statements are correct?
If
\[
A = \begin{pmatrix} p & q \\ 0 & 1 \end{pmatrix}, \quad
B = \begin{pmatrix} 1 & q \\ 0 & 1 \end{pmatrix},
\]
then
(A) \[
B^n = \begin{pmatrix} 1 & nq \\ 0 & 1 \end{pmatrix}
\]
(B) \[
A^n = \begin{pmatrix} p^n & q\frac{p^n-1}{p-1} \\ 0 & 1 \end{pmatrix}, \; \text{if } p \neq 1
\]
(C) \[
AB = \begin{pmatrix} p & pq+q \\ 0 & 1 \end{pmatrix}
\]
(D) \[
B^{n-1} = \begin{pmatrix} 1 & (n+1)q \\ 0 & 1 \end{pmatrix}
\]
(E) \[
AB^n = \begin{pmatrix} p & (np+1)q \\ 0 & 1 \end{pmatrix}
\]
Choose the correct answer from the options given below: