# Is the language $\{i|f(i)=1\}$ recursive, function $f$ is described further inside. [duplicate]

$$L = \{i\mid f(i)=1\}$$ $f(i)$ equals $1$ if there is a sequence of at least $i$ consecutive $5$s in the decimal expansion of $\pi$, and $0$ otherwise.

Is there a total Turing Machine that can represent that language for any $i$?

-

## marked as duplicate by Carl Mummert, Thomas, Martin Sleziak, Norbert, tomaszOct 9 '12 at 20:54

• If there's a run of $n$ fives in $\langle\pi\rangle$, the decimal expansion of $\pi$, there are also runs of $1,2,\ldots,n-1$ fives.
• We don't know the entire sequence of digits in $\langle\pi\rangle$. But there are two cases to consider: Either $\langle\pi\rangle$ has unbounded runs of fives, or it doesn't, and the maximum run has length $n$. (we don't know precisely which is the case). Can you devise a decider (a TM that decides yes or no for every input) for each case?