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


Suppose $f: [0, \infty) \to \mathbb R$ is continuous and nearly 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 a.e.? That is, is $F$ equal a.e. to a constant function?



Nearly eventually almost periodic functions
I tried to prove a positive answer by copying and modifying a bit [Dap](https://mathoverflow.net/users/112284/dap)’s answer to your very similar [question](https://mathoverflow.net/q/324513), so a main contribution to this answer belongs to @Dap.


Let $$Z\_a=\{x\in[0,a)| \mbox{ the sequence }\{f(x + np)\}\_{n \in \mathbb N}\mbox{ does not converge}\}.$$ Then $Z\_a$ has measure $0$. 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)\setminus Z\_a$, so a measure of $C\_N$ is positive for some $N$. For each $t\in (2\epsilon/3)\Bbb Z$ put $$D\_t=\{ x\in[0,a)\mid f(x+aN) \in [t-\epsilon/3,t+\epsilon/3]\}.$$ Since the function $f$ is continuous, the sets $D\_t$ are closed and cover $[0,a)$, so a measure of $G=C\_N\cap D\_t$ is positive for some $t$.


This implies that
$$\lim\_{m\to\infty}f(x+am)\in [t-2\epsilon/3,t+2\epsilon/3]\text{ for all } x\in G,$$
which gives
$$\phantom{abcdefghi}f(x+an)\in[t-\epsilon,t+\epsilon]\text{ for all }x\in G\text{ and }n\geq N.$$


Let $$Z\_1=\{x\in[0,1)|\mbox{ the sequence }\{f(x + np)\}\_{n \in \mathbb N}\mbox{ does not converge}\}.$$ Then $Z\_1$ has measure $0$. If Lemma below holds then for almost any $x\in[0,1)\setminus (Z\_a\cup Z\_1)$ the sequence $\{x+n\}$ lies in the set $G+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) \setminus Z\_a.\phantom{abc}$$ So $\sup F-\inf F\leq 2\epsilon$ for all $\epsilon,$ which means $F$ is constant.


**Lemma.** For almost any $x\in[0,1)$ the sequence $\{x+n\}$ lies in the set $G+a\mathbb N$ infinitely often.


Put $G’=G+a\mathbb N$ and for each $n\in N$ put $G’\_n=\bigcup\_{k \in\Bbb N,\, k\ge n} G’-k$ and $G’’=\bigcap\_{n\in\Bbb N} G’\_n$. It suffices to show that a set $G’’\cap [0,1]$ has measure $1$. For this we have to show that for each $n\in\Bbb N$ a set $G’\_n\cap [0,1]$ has measure $1$. This should be a known result, but I don’t found an exact reference.
I guess that a map $$T=T\_{1-a}: [0,1]\to [0,1],\, x\mapsto x-a-\lfloor x-a\rfloor$$ is an [irrational rotation](https://en.wikipedia.org/wiki/Irrational_rotation), which is [ergodic](https://en.wikipedia.org/wiki/Irrational_rotation#Properties). Put $E=G’\_n\cap [0,1]$. It is easy to check that $T^{-1}(E)\subset E$ and, since $a$ is irrational, $E$ has positive measure. Then, since $T$ is ergodic, $E$ has measure $1$, see third property [here](https://en.wikipedia.org/wiki/Ergodicity#Formal_definition).


