3. Petrov and Vasechkin were solving the same arithmetic problem. A certain number had to be divided by 2, multiplied by 7, and 1001 subtracted. Petrov performed all the operations correctly, while Vasechkin got everything mixed up: he divided by 8, squared the result, and also subtracted 1001. It is known that Petrov got a prime number. What number did Vasechkin get?
Answer: 295.

Solution. Note that the number 1001 is divisible by 7 without a remainder. This means that the number Petrov obtained must be divisible by 7. But it is a prime number, so Petrov got 7. Let's reverse the operations Petrov performed and find the original number: $\frac{7+1001}{7} \cdot 2=288$. Now, let's repeat Vasechkin's operations with it: $(288: 2)^{2}-1001=295$.