# Eventually almost periodic functions

Call a function $$f: [0, \infty) \to \mathbb R$$ eventually almost periodic with period $$p > 0$$ if for all $$x \in [0, p)$$, the sequence $${f(x + np)}_{n \in \mathbb N}$$ converges.

Suppose $$f: [0, \infty) \to \mathbb R$$ is continuous and eventually almost periodic of periods $$1$$ and $$a$$, where $$a$$ is irrational and $$0 < a < 1$$. Define $$F: [0, 1) \to \mathbb R$$ by $$F(x) := \lim_{n \to \infty} f(x + n)$$. Is $$F$$ necessarily constant?

• In your definition, "the sequence converges" in what topology? – Alexandre Eremenko Mar 3 at 14:26
• Err, the standard topology on the reals. – James Baxter Mar 3 at 14:35
• f(x+np) is a value sir. Pointwise if you wanna view them as functions. Also I’m editing the question a little. – James Baxter Mar 3 at 14:43
• Can you give an example where $F$ is not constant? – Sam Hopkins Mar 3 at 14:44
• Yes, though the construction is a little sketchy, but imagine a series of bump functions that take the value 1 at all points of the form na or n, for n integer. By making the bumps thin out, we can make F converge to 1 at 0 and 0 everywhere else. Hence the edit.. – James Baxter Mar 3 at 14:50

$$F$$ must be constant. Consider an $$\epsilon>0.$$ The sets $$C_N=\{x\in[0,a)\mid |f(x+an)-f(x+am)|\leq \epsilon/3\text{ for all }n,m\geq N\}$$ are closed and cover $$[0,a),$$ so by the Baire category theorem there is an interval $$[c,d]\subset C_N$$ for some $$0 and some $$N.$$ Shrinking the interval $$[c,d]$$ if necessary we can ensure that $$f([c,d]+aN) \in [t-\epsilon/3,t+\epsilon/3].\phantom{for all in x in [c,d]}$$ This implies that $$\lim_{m\to\infty}f(x+am)\in [t-2\epsilon/3,t+2\epsilon/3]\text{ for all } x\in[c,d],$$ which gives $$\phantom{abcdefghi}f(x+an)\in[t-\epsilon,t+\epsilon]\text{ for all }x\in[c,d]\text{ and }n\geq N.$$ But for any $$x\in[0,1)$$ the sequence $$x+n$$ lies in the set $$[c,d]+a\mathbb N$$ infinitely often, giving $$\lim_{n\to\infty}f(x+n)\in [t-\epsilon, t+\epsilon]\text{ for all }x\in[0,1).\phantom{abc}$$ So $$\sup F-\inf F\leq 2\epsilon$$ for all $$\epsilon,$$ which means $$F$$ is constant.