Skip to content
Formula

How many integers from to :

Algebra • Binary and Other Number Systems

Formula

For integers , the number of integers with is .

How to use it

  1. 1Why the : counts the gaps between neighbours, and a row of numbers has one more number than gaps (from to there are gaps but numbers).
  2. 2First turn the condition into the smallest and largest integers allowed, then use .

Worked example

How many integers satisfy ?

Step-by-step

  1. 1
    ,
  2. 2

    Why: Both ends are included, so add to the difference.

Answer

Watch out

Leaving out the is the usual off-by-one slip. If an end is not included (a strict inequality), move it in by one first.

Also known as

counting integers between two numbers, n minus m plus 1, inclusive count, fencepost

Appears in past papers

2017 (II)