# Coloring the integers

**Discrete Mathematics**Level 5

Let \(S\) be a set of natural numbers. Let \(f(S)\) be equal to the minimum number \(k\) such that it's possible to color every integer (all integers \(\ldots, -2, -1, 0, 1, 2, \ldots\), not only the set \(S\)) with one of \(k\) colors, such that two integers whose difference is in \(S\) have different colors. Let \(f(S) = 0\) if no such minimum exists (if we need infinite colors). Compute \(f(S)\) for each of the following sets.

- \(S = \{1, 2, 4, 8, 16, \ldots\}\) is the set of powers of 2.
- \(S = \{2, 4, 6, 8, 10, \ldots\}\) is the set of positive even integers.
- \(S = \{2, 3, 5, 7, 11, \ldots\}\) is the set of prime numbers.
- \(S = \{2, 3, 4, 5\}\)

Concatenate your answers. For example, if the answers are \(7, 2016, 0, 1\) in that order, enter \(7201601\).

**Your answer seems reasonable.**Find out if you're right!

**That seems reasonable.**Find out if you're right!

Already have an account? Log in here.