# If $x_n \to 0 \pmod{a}$ for every $a>0$, does it follow that $x_n \to 0$?

Let $$x_n$$ be a real-valued sequence such that $$x_n \to 0\pmod{a}$$ for every real $$a>0$$: does it follow that $$x_n \to 0$$?

Just so there is no ambiguity in the meaning of the question the hypothesis is that $$\forall a>0 \; \forall \varepsilon>0 \; \exists n_0\in\mathbb{N} \; \forall n\geq n_0 \; (x_n \in \mathopen]-\varepsilon,+\varepsilon\mathclose[+a\mathbb{Z})$$ where $$\mathopen]-\varepsilon,+\varepsilon\mathclose[+a\mathbb{Z} := \{x\in\mathbb{R} \; : \; \exists u\in\mathbb{R}\; \exists k\in\mathbb{Z} \; (|u|<\varepsilon \; \land \; x=u+ka)\}$$

(Edit: The question was initially posed with the notation “$$A$$”: I changed this to $$a$$ to avoid a notation clash with the accepted answer which uses $$A$$ for something else (essentially the set of those $$a$$).)

Addendum: The question has now been answered satisfactorily, but for completeness of MSE, let me still add some remarks that might help explain both whence the question is coming from and what the answer tells us.

Suppose we're given a single $$a>0$$, say $$a>1$$ for definiteness, and we want to find a sequence $$x_n$$ such that $$x_n \to 0 \pmod{1}$$ and $$x_n \to 0 \pmod{a}$$ yet $$x_n \to +\infty$$ in $$\mathbb{R}$$; in fact, let's even demand $$x_n \equiv 0 \pmod{1}$$ (i.e., $$x_n\in\mathbb{Z}$$). Here's how one can do it: if $$a$$ is rational it's obvious (just take $$x_n$$ to be ever larger integers that are also multiples of $$a$$); and if $$a$$ is irrational, let $$p_n/q_n$$ be the convergents of its continued fraction: they satisfy $$|q_n a-p_n| < \frac{1}{q_n}$$, which means that $$p_n$$ is both an integer, and also ever closer to $$0$$ mod $$a$$, so we have $$p_n \equiv 0 \pmod{a}$$ and $$p_n \to 0 \pmod{a}$$, yet $$p_n \to +\infty$$ in $$\mathbb{R}$$, as promised. ∎

(For example, the sequence 1, 3, 7, 17, 41, 99, etc. tends to $$0$$ mod $$\sqrt{2}$$, and is, of course, identically $$0$$ mod $$1$$.)

I suspect (thought I didn't check the details) that standard results on simultaneous Diophantine approximation (maybe applied to the $$1/a$$: my $$a$$ is in some sense “backwards” in the question) will similarly give us a sequence $$x_n$$ tending to $$+\infty$$ in $$\mathbb{R}$$ but tending to $$0$$ mod finitely many $$a$$'s (and exactly $$0$$ mod one). The question was whether this “finitely many $$a$$'s” can be strengthened to “all $$a>0$$”, and the accepted answer shows that it's not even possible for a dense $$G_\delta$$ of $$a$$.

• I'm not going to play edit wars here, but for the record, @GiorgosGiapitzakis, I think it's a bit out of bounds to have changed my chosen notation $\mathopen]-\varepsilon,+\varepsilon\mathclose[$ (which I had carefully typeset with mathopen and mathclose) into $(-\varepsilon,+\varepsilon)$ (which I personally detest because of the confusion with tuples). Both notations are quite standard. Dec 2, 2022 at 21:16
• @Gro-Tsen I'm sorry. I was not familiar with that notation so that's why I changed it. Upon some Googling, I found out this is called the "French notation". Tbh, I still don't find that notation readable, but since it's standard, I have reverted my previous edit. Apologies for the inconvenience. Dec 2, 2022 at 21:22
• Related question math.stackexchange.com/questions/3325838/… where they seems to rule out the fact that $(x_n)$ diverges. Dec 2, 2022 at 22:29
• @PseudoNeo Wondering about this map (and the coarsest topology on $\mathbb{R}$ making it continuous) was, in fact, the origin of my question! But I don't know what else to say. Dec 3, 2022 at 15:17
• @PseudoNeo I just asked this on MathOverflow. Dec 3, 2022 at 16:46

Foys's answer is good. Here is a different proof using the Fourier transform.

Proof. Observe that the following two facts are equivalent:

• $$x_n\to 0 \,(\textrm{mod} \,a)$$ for every $$a\in \mathbb{R}$$;
• $$e^{-2\pi ix_n \,t}\to 1$$ for every $$t\in \mathbb{R}.$$

Now for every $$f\in L^1(\mathbb{R})$$, it follows from Lebesgue's dominated convergence theorem that $$\widehat{f}(x_n)=\int_{-\infty}^{+\infty} f(t)e^{-2\pi i x_n \,t}dt \to\int_{-\infty}^{+\infty}f(t)dt=\widehat{f}(0).$$ Take $$f(t)=e^{-t^2}$$, then $$\widehat{f}(x)=\sqrt{\pi}e^{-\pi^2\,x^2}$$. The conclusion follows since $$\widehat{f}$$ is peak at $$x=0$$.

• Very nice and very efficient! And also, it nicely complements Foys's answer since your proof works from the assumption that $x_n \to 0\pmod{a}$ for almost all $a$ (in the sense of Lebesgue measure) whereas the other answer works from the assumption that $x_n \to 0\pmod{a}$ for a dense $G_\delta$ of $a$, and neither of the two subsumes the other. Dec 3, 2022 at 13:40

$$\newcommand{\N}{\mathbb N}$$ The result is obvious if $$n\mapsto x_n$$ is bounded. We assume it is not. It is then possible to find a subsequence of $$n\mapsto x_n$$ which converges towards either $$+\infty$$ or $$-\infty$$. So without losing generality and by symmetry we can assume that $$x_n \underset{n\to +\infty}{\longrightarrow} +\infty$$. It is possible (by picking a further subsequence) to assume that $$x_{n+1} - x_n > 1$$ for every $$n\in \N$$. Let $$V:= \bigcup_{n\in \N} ]\frac {x_n+x_{n+1}}{2} - \frac {1}{4}; \frac{x_{n+1} + x_n}{2} + \frac 1 4[$$ (EDIT:the previous set doesn't seem to work, use $$V:=\bigcup_{n\in \N} ]x_n + \frac 1 4; x_n + \frac 3 4[$$ instead).

We can then use the following lemma (which immediately gives a contradiction when applied to $$V$$ with $$x>1$$): for every unbounded open set $$W$$ in $$]0,+\infty[$$, there exists a dense subset $$A\subseteq ]0,+\infty[$$ such that for every $$x\in A$$, $$\N x \cap W$$ is infinite (i.e. unbounded). The lemma is proven with the Baire theorem. Let $$n\in \N$$, and $$A_n:= \{x \in ]0,+\infty[ \mid \exists k\geq n, kx \in W\}$$. Then $$A_n$$ is an open subset in $$]0,+\infty[$$. Let us show it is dense in $$]0,+\infty[$$. Let $$x,\varepsilon \in ]0,+\infty[$$; there is $$M>0$$ such that $$[M,+\infty[ \subseteq \bigcup_{n\in \N \backslash \{0\}} ]n(x-\varepsilon); n(x+\varepsilon)[$$ (these intervals eventually overlap: draw a picture). Since $$W$$ is unbounded, there exists $$u \in (W \backslash \bigcup_{k=0}^n ]k(x- \varepsilon), k(x+\varepsilon)[ ) \cap [M,+\infty[$$. Then there exists $$p\in\N$$ such that $$u \in ]p(x-\varepsilon), p(x+\varepsilon)[$$ and we have $$p>n$$, which proves that $$]x-\varepsilon, x+\varepsilon[ \cap A_n \neq \emptyset$$. The intersection $$\bigcap_{n\in \N} A_n$$ is dense (Baire) and has the required property.

• I have given +1, but just asking, The answer proves $x\mathbb{N} \cap V$ is unbounded. But for a contradiction, dont we need $x\mathbb{N} \cap V = x[N,N+1,...,\infty]$ for some $N$ ? Can u explain how the contradiction comes about ? Dec 3, 2022 at 7:27
• Ah, very nice! In fact you could have stopped after taking subsequences and appealed to this answer (which was referred to in the comments of the question) for an early conclusion, but it's great that you gave your answer using the Baire category theorem because it shows that categorically-many (i.e., a dense $G_δ$ of) $A$ gives the conclusion whereas the other answer shows that full-measure-many $A$ does: it's good to know both! Dec 3, 2022 at 9:52
• I remembered that there's a result of the form “for any increasing function $h\colon\mathbb{N}\to\mathbb{N}$ there is a real $x$ (in fact, categorically-many $x$) such that there are infinitely many rationals $p/q$ approximating it with $|qx-p|<\frac{1}{h(q)}$” and that it is proved using Baire, so I thought something similar might work (given that we can find counterexamples for finitely many $A$ by Diophantine approximation), but I couldn't get it right. Dec 3, 2022 at 9:57
• @Balajisb The contradiction is this: on the one hand we have an $a>1$ such that $a\mathbb{N} \cap V$ is infinite, which easily tells us that $x_n$ comes within distance $<1/4$ of $1/2$ mod $a$ for infinitely many $n$, and on the other hand, the hypothesis made in the question tells us that for all $a>0$, the sequence $x_n$ must be within distance $<1/4$ of $0$ mod $a$ after a certain point. But for $a>1$ the same $z$ cannot be within distance $<1/4$ both of $0$ and of $1/2$. Dec 3, 2022 at 10:07