And this suggests a path for lowering the magic number.  We can lower the number of bits needed by noting that the required outputs for 8 through 14 (mod 15) are the same as the outputs for 1 through 7 (mod 15), only reversed.