You can determine the pattern by using the Leibniz formula for the determinant. This is given by
$$|A| = \sum_{\sigma \in S_n} \operatorname{sgn}(\sigma)A_{1\sigma(1)}A_{2\sigma(2)} \cdots A_{n\sigma(n)}$$
where $A$ is an $n \times n$ matrix. What this formula does is essentially pick out exactly one element from each row and each column, multiply them all together, and then add up all the possible products you can form this way, multiplied by a sign that reflects the sign of the permutation that it took to form each product.
Because there are so many zeros in that matrix, a lot of possible terms get thrown out in this formula. In particular, going down the first column of that matrix, for each entry we can consider all the possible products that include that entry (and per the formula, no other entry from that column). (Doing this recursively gives you the Laplace cofactor expansion formula for the determinant.) As the first entry in that column is zero, we get nothing from this. For every $i$th entry thereafter, we look at all the possible products of elements with exactly one entry from each remaining row and column. For each column, the only possible choices are $a_j$ or 1, and in fact the only column for which it can be one is the $i$th column (it can't be $a_i$ for that column since $a_i$ comes from the $i$th row, from which an entry has already been picked from the first column). Therefore the only possible product we can form is that of multiplying all the $a_j$'s together, except for $a_i$. Letting $p = a_1a_2\cdots a_n$ per egreg's comment, this looks like $p/a_i$. Now we have to ask what is the sign of the permutation that got us this particular product. Most of the entries in this product lie along the main diagonal, so their row has the same index as their column. Thus they correspond to fixed elements of the permutation, which do not affect the sign. In fact, for each product there are only two columns from which an entry is picked from a row with a different index, and this corresponds to a transposition. Therefore the sign is always odd. This gives us the formula
$$\sum_{i=1}^n p/a_i$$
as seen in egreg's comment.