Let $k$ be a fixed integer and consider the sequence $$1, k, k+1, 2k, 2k+1, 3k, 3k+1, 4k, 4k+1, \dotsc.$$
These are all the integers that are congruent to either 0 or 1 mod $k$.
It is immediate that for $k=2$, the sequence in closed form is $a_n = n$ if we use $n$ to index. However, for larger fixed $k$ I am not able to work out a closed form. Initially I tried using floor/ceilings but I could not find anything to account for the alternating sized gaps between terms. Does such a form even exist?
The following gives $a_0=1, a_1=k, a_2=k+1, a_3=2k, \,\dots\,$:
$$ a_n = \left\lfloor \frac{n+1}{2} \right\rfloor \, k + (n+1) \bmod 2 $$