Below is the question I am having difficulties with:
Show: If the $\prod_{i=1}^{n} a_i$ has strictly less than $n$ distinct prime divisors, then there is an $I \subseteq \lbrace 1,...n\rbrace$ s.t. $\prod_{i \in I} a_i$ is a perfect square.
The simplest case I already did:
Consider the simplest case, where $\forall i \in \lbrace 1,...n\rbrace: a_i = p_i \in \mathbb{P}$.
Then by the Pigeon Hole principle $\exists (i,j) \in \lbrace 1,...n\rbrace^2: a_i=p_i=p_j=a_j$.
Now we can simply chose $I = \lbrace i,j \rbrace$ such that $\prod_{i \in I} a_i = p_i^2 = p_j^2$ which is a perfect square.
For the general case, I find it difficult to formally show that the statement is true. The following is my attempt so far:
Let $a_i=\prod_{j=1}^{n-1} p_{j}^{\alpha _{j _{i}}}$ where $\alpha _{j _{i}} \geq 0$. Then
$$\prod_{i=1}^{n} a_i = \prod_{i=1}^{n} \prod_{j=1}^{n-1} p_{j}^{\alpha _{j _{i}}} = \prod_{j=1}^{n-1} \prod_{i=1}^{n} p_{j}^{\alpha _{j _{i}}} = \prod_{j=1}^{n-1} p_{j}^{ \sum_{i=1}^{n} \alpha _{j _{i}}}$$
where there exists at least one $j$ s.t $$\sum_{i=1}^{n} \alpha _{j _{i}} \geq 2$$
However, from this point, I don't really see how I can apply the Pigeon Hole principle. Would really appreciate some insight here.
Thanks folks in advance!
Here are the bare outlines of a proof. It does not use the pigeonhole principle, as I don't see how that applies to this problem.
The proof hinges on the fact that in a $k$-dimensional vector space, with $k<n$, any set of $n$ vectors will be linearly dependent.
Suppose there are $k<n$ prime divisors of the $a_i$. Each $a_i$ can be uniquely written as a product of prime powers using those $k$ primes (unused primes have exponent $0$ of course). This corresponds to a vector in $\mathbb{Z}_2^k$, the k-dimensional vector space over $\mathbb{Z}_2$, the integers mod $2$, simply by taking as the vector's coordinates those prime exponents modulo $2$.
To turn this into a proof you will have to justify why the vector space does what you want, i.e. establish the homomorphism and show that a linearly dependent set of vectors gives you the set $I$ that you are looking for.
Edit: As the other answer shows, it is possible to prove it using the pigeonhole principle, using the possible sets $I$ as the pigeons, and the elements of the vector space $\mathbb{Z}_2^k$ as the pigeonholes.