Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any computable function $f(n)$, which given any integer $n$ has been proven to return either $0$ or $1$ in finite time, and for which the statement "$f(1), f(2), f(3),\ldots$ contains arbitrarily large sequences of $0$'s" has been proved to be undecidable in PA or ZFC?

If not, is there any proof of the existence or non-existence of such a function?

Edit: Is there one which is also morally undecidable?

share|cite|improve this question
What is meant by "morally undecidable"? – r.e.s. Oct 16 '11 at 14:30
up vote 4 down vote accepted

Let $G$ be a Gödel sentence (with intuitive meaning "I cannot be proved"), and take $$f(n)=\cases{0&\text{if }G\text{ has a proof with Gödel number }<n\\1&\text{otherwise}}$$

share|cite|improve this answer

Let $G(n)$ be the Goodstein sequence with first element $n$, and take $$f(n)=\cases{0&\text{if }0 \ \text{is an element of} \ G(n) \\1&\text{otherwise.}}$$

EDIT: ZFC proves the statement $\unicode{8220}f(n)=0\text{ for all }n\unicode{8221}$ and also proves that that statement cannot be proved in PA. However, this alone might not imply that PA can't prove the weaker statement $\unicode{8220}f(1),f(2),f(3),\ldots$ contains arbitrarily long sequences of $0\text{s}\unicode{8221}.$ Since I don't know whether PA can in fact prove the latter (weaker) statement, I'm unsure whether my above answer is correct after all.

share|cite|improve this answer
Do you mean: undefined otherwise, and we know that doesn't happen, and we were not asked that that prove is in PA? - I don't see how it could work otherwise. – Christian Sievers Jun 21 at 11:48
@ChristianSievers - I think you've noticed a flaw in my answer, and I don't see how making $f$ "undefined otherwise" will fix it (as the "otherwise" case seems irrelevant). Although PA can't prove "$f(n)=0$ for all $n$" (as ZFC can), that fact alone does not, of course, imply that PA can't prove the weaker statement "$f(1),f(2),f(3),\ldots$ contains arbitrarily long sequences of $0$s". (I don't know whether PA can prove the latter statement, so I'm not sure what I was thinking when I posted this answer.) – r.e.s. Jun 22 at 20:19
Without already using the proof that eventually 0 appears in the Goodstein series, I don't see how to show that your function is computable, while "undefined otherwise" is simple. I thought "arbitrarily long sequences of 0s" implied that all is zero, but that is indeed a different problem. – Christian Sievers Jun 23 at 0:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.