For a positive integer , define the positive integer to be -safe if differs in absolute value by more than 2 from all multiples of . For example, the set of 10-safe numbers includes .
Find the number of positive integers less than or equal to 10 000 which are simultaneously 7-safe, 11-safe, and 13-safe.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
If a number x is 7-safe, 11-safe and 13-safe, we must have the following to all be true:
⎩ ⎪ ⎨ ⎪ ⎧ x x x ≡ 3 , 4 ( m o d 7 ) ≡ 3 , 4 , 5 , 6 , 7 , 8 ( m o d 1 1 ) ≡ 3 , 4 , 5 , 6 , 7 , 8 , 9 , 1 0 ( m o d 1 3 )
Since these mods are all primes, by Chinese Remainder Theorem we have that all solutions for x are in mod 7 × 1 1 × 1 3 = 1 0 0 1 .
We have 2 choices for the value of x ( m o d 7 ) , 6 choices for the value of x ( m o d 1 1 ) and 8 choices for the value of x ( m o d 1 3 ) . Thus, there are 2 × 6 × 8 = 9 6 total solutions for x ( m o d 1 0 0 1 ) .
We now consider the number of solutions in the below set:
{ { 1 , 2 , … , 1 0 0 1 } , { 1 0 0 2 , 1 0 0 3 , … , 2 0 0 2 } , … , { 9 0 0 9 , 9 0 1 0 , … , 1 0 0 1 0 } }
From above, there are 9 6 × 1 0 = 9 6 0 solutions, but we must subtract the number of solutions in { 1 0 0 0 1 , 1 0 0 0 2 , … , 1 0 0 1 0 } . Since 1 0 0 1 0 ≡ 0 ( m o d 7 ) , 1 0 0 0 6 ≡ − 4 ( m o d 7 ⋅ 1 1 ⋅ 1 3 ) and 1 0 0 0 7 ≡ − 3 ( m o d 7 ⋅ 1 1 ⋅ 1 3 ) . We further note that no other values can satisfy this. Thus, we must subtract these 2 solutions.
Therefore, we have a total of 9 6 0 − 2 = 9 5 8 positive integers less than 10 000 which are simultaneously 7-safe, 11-safe and 13-safe.