Nearly eventually almost periodic functions 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?
 A: I tried to prove a positive answer by copying and modifying a bit Dap’s answer to your very similar question, 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, which is ergodic. 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.
