Construction of a noncommon continuous real function First a simple definition. We say that a point $x$ is a local strict maximun (LSM) of $f$, if there exists a $\delta > 0$ such that
$$
0 < |x-y| < \delta \implies f(y) \lt f(x).
$$
One can prove, using the Baire Category Theorem, that there exist continuous functions 
$$
f:\mathbb{R} \to \mathbb{R}
$$
such that the set of LSM points of $f$ is a dense subset of $\mathbb{R}$. But can I find an explicit example of such a function? 
Here is a proof of the existence of such functions: V. Drobot, M. Morayne Continuous Functions with a Dense Set of Proper Local Maxima, The American Mathematical Monthly, Vol. 92, No. 3 (March, 1985), pp. 209–211, MR786345.
An additional function, a function such that the LSM it´s just $$
\left\{ {\frac{1}
{n}} \right\} \cup \left\{ 0 \right\}
$$
without using the example of the rationals, I ask this , because in the paper says that it´s trivial to construct a function such that has this set, as LSM. But I can´t see it xD
 A: The following is not really an answer (which is given in t.b.'s 2nd contribution to the comments to your question), but rather it gives some results that are of related interest.
It is even possible to define an everywhere (finitely) differentiable function $g$ that has any specified countable set as the set on which $g$ has strict local maxima. See Blazek/Borák/Malý [1] (freely available on the internet) and Katznelson/Stromberg [2] for very detailed constructions of such functions. Of course, this can't happen if the function is $C^1$ on any interval, so any such function is an example of an everywhere differentiable function whose derivative has a dense set of discontinuities. Curiously, in the Baire category sense, most everywhere (finitely) differentiable functions on a specified interval have strict local maxima on a (countably) dense subset of that interval and strict local minima on a (countably) dense subset of that interval. See Weil [3] for the details. This is strengthened in Weil [4], where it is shown that most bounded derivatives on $[0,1]$ are discontinuous on a set whose relative complement has Lebesgue measure zero. (Note that this is stronger than is needed for the derivative to not be Riemann integrable on any subinterval of $[0,1],$ since for this we only need the discontinuities to have positive measure on every subinterval.) In contrast to this, recall that every derivative is continuous on the complement of a first category set, since every derivative is a Baire $1$ function. In Bruckner/Petruska [5] (Theorem 2.4) this result for most bounded derivatives on $[0,1]$ is strengthened to "on a set whose relative complement has $\mu$-measure zero" for any specified finite Borel measure $\mu,$ and in Kirchheim [6] (Theorem 2) this result for most bounded derivatives on $[0,1]$ is strengthened to "on a set whose relative complement has Hausdorff $h$-measure zero" for any specified Hausdorff measure function $h.$ Note that these last results give an abundance of examples such that $[0,1] = A \cup B$, where $A$ is about as small as you can ever desire from a measure standpoint and $B$ is as large as possible from a Baire category standpoint. Simply take any Baire typical bounded everywhere differentiable function $f$ and let $A = C(f)$ be the continuity set of $f'$ and let $B = D(f)$ be the discontinuity set of $f'$. And, of course, by using a countable union of appropriate translations of any such decomposition of $[0,1]$, we get an analogous decomposition for $\mathbb R.$
[1] Jiri Blazek, Emil Borák, and Jan Malý, On Köpcke and Pompeiu functions, Casopis Pro Pestování Matematiky 103 (1978), 53-61.
http://gdz.sub.uni-goettingen.de/no_cache/dms/load/img/?IDDOC=104431
[2] Yitzhak Katznelson and Karl Robert Stromberg, Everywhere differentiable, nowhere monotone, functions, American Mathematical Monthly 81 (1974), 349-354.
[3] Clifford Edward Weil, On nowhere monotone functions, Proceedings of the American Mathematical Society 56 (1976), 388-389.
[4] Clifford Edward Weil, The space of bounded derivatives, Real Analysis Exchange 3 (1977-78), 38-41.
[5] Andrew Michael Bruckner and György Petruska, Some typical results on bounded Baire $1$ functions, Acta Mathematica Hungarica 43 (1984), 325-333.
[6] Bernd Kirchheim, Some further typical results on bounded Baire one functions, Acta Mathematica Hungarica 62 (1993), 119-129.
