2. Scheherazade tells the Shah mathematical tales. A mathematical tale is an equation of the form $a x+b y=c$, where $a, b, c$ are natural numbers ranging from 1 to 17 (inclusive). A tale is sad if the corresponding equation has no solutions in integers (for example, the tale $2 x+4 y=7$ is sad, while the tale $3 x+5 y=2$ is not: this equation has a solution $x=-1, y=1$). Can Scheherazade invent 1001 different sad tales?
Answer: will be able to.

Solution. The following fairy tales will be sad:

a) a and b are even, c is odd. There are 8$\cdot$8$\cdot$9=576 such fairy tales.

b) a and b are divisible by 3, c is not divisible by 3. There are 5$\cdot$5$\cdot$12 such fairy tales. However, we need to account for the overlap with a): a and b are divisible by 6, c is odd and not divisible by 3. There are $2 \cdot 2 \cdot 6=24$ such fairy tales.

In total, a) and b): $576+300-24=852$

c) a and b are divisible by 5, c is not divisible by 5: there are 3$\cdot$3$\cdot$14=126 such. However, among them, $1 \cdot 1 \cdot 7$ have already been counted in a), and $1 \cdot 1 \cdot 10$ - in b). In total, new ones - 109

d) Fairy tales of the form $a=b=p, c \neq p$, where $p$ is one of the numbers 11, 13, 17. There are 3$\cdot$16=48 such fairy tales.

In total, there are already $852+109+48=1009$.

Evaluation. Full solution - 7 points. For errors related to the overlap of series, and arithmetic errors - deduct 1-3 points, depending on their severity.