Safety first

For a positive integer p p , define the positive integer n n to be p p -safe if n n differs in absolute value by more than 2 from all multiples of p p . For example, the set of 10-safe numbers includes { 3 , 4 , 5 , 6 , 7 , 13 , 14 , 15 , 16 , 17 } \{3, 4, 5, 6, 7, 13, 14, 15, 16, 17\} .

Find the number of positive integers less than or equal to 10 000 which are simultaneously 7-safe, 11-safe, and 13-safe.


The answer is 958.

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.

1 solution

Sharky Kesa
Jun 14, 2017

If a number x x is 7-safe, 11-safe and 13-safe, we must have the following to all be true:

{ x 3 , 4 ( m o d 7 ) x 3 , 4 , 5 , 6 , 7 , 8 ( m o d 11 ) x 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ( m o d 13 ) \begin{cases} x &\equiv 3, 4 \pmod{7}\\ x &\equiv 3,4,5,6,7,8 \pmod{11}\\ x &\equiv 3,4,5,6,7,8,9,10 \pmod{13}\\ \end{cases}

Since these mods are all primes, by Chinese Remainder Theorem we have that all solutions for x x are in mod 7 × 11 × 13 = 1001 7\times 11 \times 13 = 1001 .

We have 2 choices for the value of x ( m o d 7 ) x \pmod{7} , 6 choices for the value of x ( m o d 11 ) x \pmod{11} and 8 choices for the value of x ( m o d 13 ) x \pmod{13} . Thus, there are 2 × 6 × 8 = 96 2 \times 6 \times 8 = 96 total solutions for x ( m o d 1001 ) x \pmod{1001} .

We now consider the number of solutions in the below set:

{ { 1 , 2 , , 1001 } , { 1002 , 1003 , , 2002 } , , { 9009 , 9010 , , 10010 } } \{\{1,2,\ldots,1001\},\{1002,1003,\ldots,2002\},\ldots,\{9009, 9010, \ldots, 10010\}\}

From above, there are 96 × 10 = 960 96 \times 10 = 960 solutions, but we must subtract the number of solutions in { 10001 , 10002 , , 10010 } \{10001, 10002, \ldots, 10010\} . Since 10010 0 ( m o d 7 ) 10010 \equiv 0 \pmod{7} , 10006 4 ( m o d 7 11 13 ) 10006 \equiv -4 \pmod{7 \cdot 11 \cdot 13} and 10007 3 ( m o d 7 11 13 ) 10007 \equiv -3 \pmod{7\cdot 11 \cdot 13} . We further note that no other values can satisfy this. Thus, we must subtract these 2 solutions.

Therefore, we have a total of 960 2 = 958 960-2=\boxed{958} positive integers less than 10 000 which are simultaneously 7-safe, 11-safe and 13-safe.

In first attempt I provide 960 then recheck and found the mistake

Kushal Bose - 3 years, 12 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...