Let $S$ be a sequence of $N$ numbers containing $n$ distinct positive integers. Prove that if $N>2^n-1$ then $S$ has a consecutive subsequence whose product is a perfect square. Use Pigeonhole principle.
I have been thinking that for a set that has $n$ distinct numbers will have $2^n$ number of subsets. And by the pigeonhole principle, there will be 2 sequence share the same combination. But I got stuck to find a perfect square.
Suppose your $n$ distinct numbers are $\{a_1,\cdots, a_n\}$ and that your sequence is $\{s_1,\cdots s_N\}$. Of course each $s_i$ equals some $a_j$.
For each consecutive subsequence $T$ we define the $n$ tuples of parities, $\Delta (T)=(\delta_1, \cdots, \delta_n)$ where $\delta_i$ is $0$ if $a_i$ appears an even number of times in the subsequence and it is $1$ otherwise. Note that there are $2^n$ possible values for $\Delta(T)$.
Consider first the $N$ consecutive subsequences $S_i=\{s_1,\cdots, s_i\}$. Since there are at least $2^n$ of these we see that either every possible value for $\Delta (T)$ is hit or one value is hit twice.
If every value is hit then we have some $i$ for which $\Delta (S_i)=(0,\cdots, 0)$ and clearly that $S_i$ works.
If some value is hit twice then we have a pair $i<j$ such that $\Delta(S_i)=\Delta(S_j)$ and then the consecutive sequence $\{s_{i+1}, \cdots, s_j\}$ works. And we are done.