Say $X_1, X_2, \dots X_n$ are i.i.d. Bernoulli random variables with parameter $0 < p < 1.$ Consider the following random variable: $$Y = \sum_{i,j} c_{ij}X_iX_j $$ where $c_{ij}$ is a constant. I am interested in studying the distribution of $Y$ and would like to find a moment generating function for it. Unfortunately, while finding the expected value and variance is relatively straightforward, because of the dependence produced from the multiplication, finding the MGF has alluded me. $Y$ is similar to the square of a binomial distribution (I am not sure if the square is a well studied distribution).
Edit: If it makes the calculation easier, one can work under the simplification that $$Y = \sum_{i,j} X_iX_j $$