# 2012 AMC 12A Problems/Problem 17

## Problem

Let $S$ be a subset of $\{1,2,3,\dots,30\}$ with the property that no pair of distinct elements in $S$ has a sum divisible by $5$. What is the largest possible size of $S$? $\textbf{(A)}\ 10\qquad\textbf{(B)}\ 13\qquad\textbf{(C)}\ 15\qquad\textbf{(D)}\ 16\qquad\textbf{(E)}\ 18$

## Solution

Of the integers from $1$ to $30$, there are six each of $0,1,2,3,4\ (\text{mod}\ 5)$. We can create several rules to follow for the elements in subset $S$. No element can be $1\ (\text{mod}\ 5)$ if there is an element that is $4\ (\text{mod}\ 5)$. No element can be $2\ (\text{mod}\ 5)$ if there is an element that is $3\ (\text{mod}\ 5)$. Thus we can pick 6 elements from either $1\ (\text{mod}\ 5)$ or $4\ (\text{mod}\ 5)$ and 6 elements from either $2\ (\text{mod}\ 5)$ or $3\ (\text{mod}\ 5)$ for a total of $6+6=12$ elements. Considering $0\ (\text{mod}\ 5)$, there can be one element that is so because it will only be divisible by $5$ if paired with another element that is $0\ (\text{mod}\ 5)$. The final answer is $\boxed{\textbf{(B)}\ 13}$.

## Video Solution by OmegaLearn

~ pi_is_3.14

The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. 