Let $f:\mathbb{N}\to\mathbb{N}$ be given by $f(n)=1$ if the decimal expansion of $\pi$ contains $n$ consecutive $5$'s, and $f(n)=0$ otherwise.
How would you go about showing such a function is primitive recursive?
I suppose you should be able to construct it out of other p.r. functions, via composition or the basic recursion scheme that the family of p.r. functions is closed under (I don't know if such an algorithm has a name). However, I do not know how to deal with the decimal expansion of anything (much less an irrational) as something that would come from p.r. functions. Particularly because if it's irrational, you'd have to express it as an infinite series (i.e. an infinite number of sums).