I found myself curious whether there existed a complex function which is analytic on the interior of the unit disc, but such that there is no extension of the function to a holomorphic function on a strictly larger connected open set. This was because all the typical examples I could think of with a finite radius of convergence of the Taylor series had natural analytic extensions near all but finitely many points of the boundary of the region of convergence.
The example I came up with was: $$f(z) := \sum_{n=0}^\infty \frac{z^{2^n}}{2^n}.$$ This function has radius of convergence 1, and at every point of $|z| = 1$ it converges to a function whose imaginary part has $\Im f(e^{i \theta})$ equal to the Weierstrass function. Therefore, the restriction to the unit circle is not differentiable (as a function on the real $C^\infty$ manifold $S^1$) at any point, which makes it impossible for any extension of $f$ to be holomorphic at any point on the unit circle (since Abel's theorem implies such an extension wouldn't have a pole at such a point).
My question is: is this a valid example, or is there something I'm missing? And also, is there a more natural example of such a function in terms of the usual examples of analytic functions?