Prove that the function $$f(x)=\sum_{n=1}^{\infty}a^ncos(4^nx)$$ is continuous every where on $\Bbb R$ and nowhere differentiable when $\frac{1}{4}+\frac{\pi}{8}<a<1$.
My attempt:
I encountered this question during my advanced engineering mathematics and I know it's related to continuity (whether uniform or not). There are many different theorems there stating that if a bunch of sequential functions $f_n$ tend to some function $f$ (which probably we don't know all the specifics) then many of $f_n$ s' properties are preserved also for function $f$ such as integrability and differentiability. I know this theorem but I don't know where to start. I appreciate any idea helping me solve this problem.
Thanks in Advance!