Y by
Hello guys, I want to know what was wrong with my PIE approach.
First here's the problem:
For a positive integer
, define the positive integer
to be
-safe if
differs in absolute value by more than
from all multiples of
. For example, the set of
-safe numbers is
. Find the number of positive integers less than or equal to
which are simultaneously
-safe,
-safe, and
-safe.
My approach was finding the number of 7-unsafe numbers, 11-unsafe, and 13-unsafe, then finding 77-unsafe, 91-unsafe, 143-unsafe, and finally 1001-unsafe numbers and using PIE for a complementary counting approach. But somehow I got a number over than 10,000 for the total number of unsafe numbers. Is my approach valid and have I made arithmetic errors or does the PIE approach just not work?
First here's the problem:
For a positive integer












My approach was finding the number of 7-unsafe numbers, 11-unsafe, and 13-unsafe, then finding 77-unsafe, 91-unsafe, 143-unsafe, and finally 1001-unsafe numbers and using PIE for a complementary counting approach. But somehow I got a number over than 10,000 for the total number of unsafe numbers. Is my approach valid and have I made arithmetic errors or does the PIE approach just not work?