Problem

Source: USAMO 2004, problem 2

Tags: vector, induction, integration, number theory, greatest common divisor, algorithm, relatively prime



Suppose $a_1, \dots, a_n$ are integers whose greatest common divisor is 1. Let $S$ be a set of integers with the following properties: (a) For $i=1, \dots, n$, $a_i \in S$. (b) For $i,j = 1, \dots, n$ (not necessarily distinct), $a_i - a_j \in S$. (c) For any integers $x,y \in S$, if $x+y \in S$, then $x-y \in S$. Prove that $S$ must be equal to the set of all integers.