DZone

Here’s how to construct what John Horton Conway calls his "subprime fib" sequence. Seed the sequence with any two positive integers. Then at each step, sum the last two elements of the sequence. If the result is prime, append it to the sequence. Otherwise, divide it by its smallest prime factor and append that.

If we start the sequence with (1, 1) we get the sequence

Source: DZone