+0

# Mod Math

0
278
2

If 1,000 mod n =1, where n=1, 2, 3,4...........998, 999, 1000, just how many n are there between 1 and 1,000? Thank you for help.

Oct 29, 2018

#1
0

Here is a bit of computer code that calcultes this kind of question in no time.
a=1000; b=1000; c=(1); n=2; if((a % n)==1,c=(c,n),0); n++; if(n<=b,gotor-2,c);printc; c=sumfor(n, 1, b, (a % n)==1);print"Total =",c
(3, 9, 27, 37, 111, 333, 999) = 7 Numbers.

Oct 30, 2018
#2
+10

If 1,000 mod n =1, where n=1, 2, 3,4...........998, 999, 1000, just how many n are there between 1 and 1,000?

$$\text{Since 1000 \pmod 1 = 0 and 1000 \pmod {1000} = 0, n can only be 2,3, \ldots , 999.}$$

$$\begin{array}{|rcll|} \hline 1000 & \equiv & 1 \pmod n \\ \text{or} \\ 1000-1 &=& n\cdot m,~ \text{with } m \in \mathbb{Z} \\ 999 &=& n\cdot m,~ \text{so n are all divisors of 999 except 1 } \\ \hline \end{array}$$

The divisors of 999 are:

Divisors:

1 | 3 | 9 | 27 | 37 | 111 | 333 | 999 (8 divisors)

n = 3 | 9 | 27 | 37 | 111 | 333 | 999 (7 numbers) Oct 30, 2018