Define a function f:R→R by
f(x)=n=1∑∞2−n∥2nx∥
where ∥t∥ is the distance from t to the nearest integer. Prove that f is continuous. [Results about uniform convergence may not be used unless they are clearly stated and proved.]
Suppose now that g:R→R is a function which is differentiable at some point x, and let (un)n=1∞,(vn)n=1∞ be two sequences of real numbers with un⩽x⩽vn for all n, un=vn and un,vn→x as n→∞. Prove that
n→∞limvn−ung(vn)−g(un)
exists.
By considering appropriate sequences of rationals with denominator 2−n, or otherwise, show that f is nowhere differentiable.