This is not a coincidence. The expansions of the form are actually predicted via the Binomial theorem (used to create Pascal's triangle). To predict coefficients of these equations one can use the formula for n choose k as seen below.