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

For every number N in a sequence of numbers it is true that each odd N is followed by 0 or more other numbers (not including 0) then the number N+1.

How do I write this formally?

This is my attempt but it is probably wrong.

∀ a at position b: 
    a is odd ∧
    ∃ c at position d: 
        d > b ∧ 
        c = a + 1 ∧ 
        ∀ e at position f: 
            d > f > b ∧ 
            e != 0
share|cite|improve this question
up vote 1 down vote accepted

If I understand you correctly, you have a sequence $\langle n_k:k\in\mathbb{N}\rangle$ of integers. You want to say that if $n_k$ is odd, then there is some $m>k$ such that (a) $n_m=n_k+1$, and (b) $n_i\ne 0$ whenever $k<i<m$. How you write it formally depends on what formalism you’re using, but here’s one possibility:

$$\forall k\in\mathbb{N}\left(n_k\text{ is odd}\to\exists m>k\Big(n_m=n_k+1\land\forall i\in\mathbb{N}\big(k<i<m\to a_i\ne 0\big)\Big)\right)$$

Added: You can specify beforehand that all variables and indices range only over natural numbers, so that this doesn’t have to be embedded in the description of the desired property. If the sequence is finite, and the length is known ahead of time, that too can be specified, say as $N$. Then you can write:

$$\forall k<N\left(n_k\text{ is odd}\to\exists m\Big(k<m\le N\land n_m=n_k+1\land\forall i\big(k<i<m\to a_i\ne 0\big)\Big)\right)$$

share|cite|improve this answer
It makes sense but I have a few questions. What does the arrow → mean in words? Is there any difference between using : (such that) and enclosing parts in brackets as you have? Do they brackets add meaning other than grouping? If I were to use the : as well as brackets would that be ok? How would you change it to indicate that k has an upper limit (being the length of the sequence). Is this possible/needed? – diolemo Feb 18 '12 at 22:13
The arrow is implies. In the notation to which I’m accustomed, you wouldn’t use the colon; the parentheses both embody such that and indicate the grouping. It would not be appropriate to use both in this formalism. I’ll modify the answer to address the matter of an upper limit. – Brian M. Scott Feb 18 '12 at 22:33

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.