For k >= 2, the difference a(n+k) - a(n) is divisible by k. It follows that for each k, the sequence formed by taking a(n) modulo k is periodic with period dividing k. For example, modulo 10 the sequence becomes [1, 1, 7, 9, 5, 1, 1, 7, 9, 5, ...], a purely periodic sequence of period 5. Cf.
A047974. -
Peter Bala, Feb 11 2025