I have a product formula that, given a tuple $(a_1, \dots, a_{n-1}, 0)$, computes a dimension (of a vector space) via the following formula: $$ \mathrm{dimension} = \prod_{i < j} {(a_i + \cdots + a_{j-1}) + j-i \over j-i} \qquad \text{for } 1 \leq i < j \leq n $$
I am trying to prove that the only tuples that give me a dimension equal to $p^2$ for a fixed prime $p$ are the tuples $\underbrace{((p^2 - 1)\cdot a_1, 0)}_{\text{has length $2$}}$, and $\underbrace{(a_1,0, \dots, 0)}_{\text{has length $p^2$}}$ and $\underbrace{(0,0, \dots,a_{p^2 - 1}, 0)}_{\text{has length $p^2$}}$. I'm inducting on the prime $p$, and for the base case $p = 3$ I have established this, but now I am confused about how to proceed further. Any tips?