I came across this question: What is the minimum number of integers required to guarantee that there will be two among them whose difference is divisible by 8?
I kinda figured out that the answer is 9, but I do not know how to justify it. Can you please help?
Yes, the answer is $9$. To see why this is, like @coffeemath said, we can consider the remainders the numbers will leave upon division by $8$. The remainders they can leave are $0,1,2,3,4,5,6,$ and $7$. Now, for any arbitrary $n$ integers, upon division by 8, these $8$ remainders may be left. Suppose we take $n=8$. Suppose the numbers leave remainders $0,1,2,3,4,5,6,$ and $7$. Then, there exist no two integers in this list such that their difference is divisible by $8$. But if we take $n=9$, using the pigeonhole principle, we get that there are two integers that leave the same remainder upon division by $8$. It follows that their difference will leave a remainder of $0$ upon division by $8$. This means that their difference is divisible by $8$.