The Curious Incident of the Dog in the Night-Time begins with chapter 2 because Christopher, the narrator, has decided to use prime numbers rather than the traditional cardinal numbers as his chapter headings. He does this because he enjoys mathematics and prime numbers particularly appeal to him.
The reader who has not guessed that Christopher is using prime numbers has to wait until chapter 19 for an explanation. Christopher shows the reader how to work out prime numbers using a chart, which demonstrates, for example, that chapter 19 itself is actually the eighth chapter.
Christopher excels at such explanations, but he also remarks on what he is unable to explain. He points out that no one has ever been able to create a simple formula for identifying prime numbers, so it can take a long time to work out whether a very high number is a prime number or not. He concludes with an interesting observation about the limits of deductive logic:
I think prime numbers are like life. They are very logical but you could never work out the rules, even if you spent all your time thinking about them.