Seed and polynomial selection algorithm for LFSR test pattern generator in built-in self-test environment