Add binaryIndexOf() method

Use binaryIndexOf() within primesContains() function