# Largest prime number erroneously erased when finding all primes less than 1000 [closed]

Chicharron is a lover of mathematics and once wanted to find all primes less than 1000. He did by the following steps below: He wrote all the numbers from 2 to 1000. He circled the number 2 and erased other multiples of 2. Then he circled the smallest number that was not erased and erased all other multiples of that number. He repeated it until all the numbers were either circled or erased.

While erasing the multiples of 2, he had erased two more odd primes by mistake. He did the rest of the job without any errors. Surprisingly, the number of circled numbers was exactly the amount of primes from 2 to 1000 inclusive, which he had intended to find. He asks Miguel, "What was the largest possible prime number I erased"?

• Just as a side comment, the method described is the classic manual 'Sieve of Erastothenes'. Commented Jul 16 at 14:23
• As far as I can tell it is not possible to determine because there is no unique answer to the largest erased prime. There are several possibilities that work. Is there something missing from the description of the problem? Commented Jul 16 at 15:39
• Welcome to Puzzling, take our tour! Could you please provide proper attribution for this question? Commented Jul 16 at 15:44
• did he start "all the other multiples of that number" at 2 each time, even though all the multiples of 2 had been marked already? Often hand-algorithms don't. I ask because, if you should have marked all multiples of n but didn't, when you get to n-squared, will you mark 2 n-squared, 3 n-squared, ... n n-squared, ... (thus knocking off n-cubed) or just pick up from n-squared times n-squared, n-squared times (n-squared + 1), ... ? Commented Jul 16 at 16:58
• @FirstNameLastName You make a number of points. One of them is to suggest replacing the words "number of" --- but there is nothing wrong with the OP's use of "number of". And you suggest replacing "cross out" with "erase". It's up to the OP, but both "cross out" and "erase" are OK in the context. Finally, one prime is not odd. Commented Jul 17 at 5:00

• @FirstNameLastName I don't agree. I think $331$ is the largest possible erased prime, and it can only have been paired with $3$ as the other erased prime. The smallest erased prime $p$ can be anything from $3$ to $23$, and the second erased prime is then any prime from $37$ to at most $1000/p$. Commented Jul 17 at 6:08