Example code snippets of various ways to detect consecutive numbers.