A sequence of natural numbers $a_1, a_2, a_3,..$ is called periodic modulo $n$ if there exists a positive integer $k$ such that, for any positive integer $i$, the terms $a_i$ and $a_{i+k}$ are equal modulo $n$. Does there exist a strictly increasing sequence of natural numbers that a) is not periodic modulo finitely many positive integers and is periodic modulo all the other positive integers? b) is not periodic modulo infinitely many positive integers and is periodic modulo infinitely many positive integers?
Problem
Source: 2005 Estonia National Olympiad Final Round grade 12 p4
Tags: Sequence, number theory, Increasing