flâneur — a map of the web's best reading

Reading 1: Static Checking

web.mit.edu · 5,027 words · saved by 1 readers

As a running example, we’re going to explore the hailstone sequence, which is defined as follows. Starting with a number n, the next number in the sequence is n/2 if n is even, or 3n+1 if n is odd. The sequence ends when it reaches 1. Here are some examples:

Reading 1: Static Checking Reading 1: Static Checking Objectives Today’s class has two topics: static typing the big three properties of good software Hailstone sequence As a running example, we’re going to explore the hailstone sequence, which is defined as follows. Starting with a number n , the next number in the sequence is n/2 if n is even, or 3n+1 if n is odd. The sequence ends when it reaches 1. Here are some examples: 2, 1 3, 10, 5, 16, 8, 4, 2, 1 4, 2, 1 2 n , 2 n-1 , … , 4, 2, 1 5, 16, 8, 4, 2, 1 7, 22, 11, 34, 17, 52, 26, 13, 40, …? (where does this stop?) Because of the odd-number

Explore this link on the map →

related reading