Let $Z=\sqrt{2}\mathbb Z$, and consider the sequence on $\mathbb{Z}$ $$\xi(k)= 1_{Z\cap [k,k+1]\neq\emptyset}.$$(remark that the intersection is either empty or with one point.)
Thanks to the comments, it is clear that this sequence is not periodic (@wojowu: the density of such $k$ goes to $1/\sqrt{2}$).
The problem is that it contradicts the following argument. Could you help me find where the error is below?
The basic idea is to consider $Z$ as a measure and write $\xi$ as the convolution $$\xi(k)=Z\star \psi(k)=\sum_{m\in \mathbb{Z}}\sum_{x\in Z}\psi(x-m)$$ where $\psi(y)=1_{[0,1]}(y)$.
One can prove in the right space that $\hat \xi=\hat Z\times \hat \psi$, and $\hat Z$ is purely atomic with Poisson summation formula. In particular, $\hat\xi$'s support is discrete, and this means with classical spectral theory (Helson, Szego, ...) that $\xi$ is periodic. I wrote all this down but I do not want to reproduce it here so that my mistake does not influence you.