Is this function $\mathbb{Q}$ periodic? Considering a function $f$ exponentially decreasing at infinity, is the following function $\mathbb{Q}$ periodic ?
$$F(x)=  \sum\limits_{q =1}^{\infty}  \; \sum\limits_{n =1}^{\infty}  \; \sum\limits_{\underset{(p,q)=1} {p=1}}^{q-1} f(n) \; e^{2 i \pi n (x+ \frac{p}{q}) }$$
First of all, the existence of the sum does not seem obvious. Then the fact that adding a rational to $x$ (it will change the order of summation) does not change the sum is absolutely not obvious (See example in my previous post: On construction of a $\mathbb{Q}$ periodic function with Fourier series, as above, a potential $\mathbb{Q}$ periodic function was proposed, unfortunately it did not work)
 A: Your sum diverges for most $x\in\mathbb{R}$. The innermost sum is
$$\sum\limits_{\underset{(p,q)=1} {p=1}}^{q-1} f(n) \; e^{2 i \pi n (x+ \frac{p}{q}) } = f(n)e^{2 i \pi nx}\sum\limits_{\underset{(p,q)=1} {p=1}}^{q-1}e^{2 i \pi n\frac{p}{q} } = f(n)e^{2 i \pi nx}\sum_{d\mid (n,q)}d\mu\left(\frac{q}{d}\right),$$
by the well-known formula for Ramanujan's sum. If $q$ is prime, then this simplifies to
$$ f(n)e^{2 i \pi nx} \left(-1+q\cdot 1_{q\mid n}\right),$$
where $1_{q\mid n}$ is $1$ or $0$ depending on $q\mid n$ or $q\nmid n$. At any rate, for $q$ prime, the $n$-sum equals (upon writing $n=qm$ when $q\mid n$)
$$ -\sum_{n=1}^\infty f(n)e^{2 i \pi nx} + q\sum_{m=1}^\infty f(qm)e^{2 i \pi qmx}.$$
If your original sum converges, then this expression tends to zero as $q\to\infty$. However, the second sum itself tends to zero as $q\to\infty$ by the exponential decay of $f$, so the first sum (which is independent of $q$) is zero:
$$ \sum_{n=1}^\infty f(n)e^{2 i \pi nx} = 0. $$
So this is a necessary condition for the convergence of your sum. Unless $f$ is identically zero, this condition fails for a typical $x\in\mathbb{R}$.
BTW if an infinite sum of continuous functions converges uniformly, then the sum is also continuous. In addition, any continuous $\mathbb{Q}$-periodic function is constant.
Added. Two comments. First, Ramanujan's formula for the quoted special case is very simple, it simply says that the sum of $q$-th roots of unity equals zero. Second, as Robert Israel remarked, the necessary condition on $x$ only holds for finitely many values modulo $1$.
