Nilsen states that one can define a function for the oracle in the Grover algorithm, which is constructed as follows. So there is a number $m$ that consists of $p$ and $q$ (both primes) $m = pq$. Now define a function that says $f (x) \equiv 1 $ if $x$ divides $m$, 0 otherwise.
Then the function $f(x)$ for $x \in \{1,7,11,77\}$ would be 1. That means in the algorithm then the amplitudes of these states would be negated and increased by the diffusion operator. If I measure the register then say I could measure states $1, 7, 11, 77$. But 1 and 77 do not bring me much as prime factors?
So that I actually measure 7 and 11 as correct prime factors, would it be enough to simply rerun the algorithm?