Similar to the 3x+1 problem (often called the Collatz Conjecture), the 7x+-1 problem is a hailstone problem that changes it's formula based on the number it working with. x is even: x/2 x mod 4 = 1: 7x+1 x mod 4 = -1: 7x-1 This goes in a loop of 8-4-2-1-8-4-2-1-... Baddies (numbers that hit the loop) may duplicate due to flaws in the code.