(a) Determine all nonnegative integers r such that it is possible for an infinite arithmetic sequence to contain exactly r terms that are integers. Prove your answer.
(b) Determine all nonnegative integers r such that it is possible for an infinite geometric sequence to contain exactly r terms that are integers. Prove your answer.