If there are a max of 76 unique numbers to test for, use the bits of two longs to remember what values have been returned. Set a bit with OR and test a bit with AND