# Need help with 3 homework quesions

• April 11th 2006, 12:24 PM
jzon
Need help with 3 homework quesions
Here are my 3 problems:

Quote:

Prove or disprove that (n^2)-1 is composite whenever n is a positive integer greater than 1
Quote:

Prove that (a mod m)(b mod m) mod m = ab mod m for all integers a and b whenever m is a positive integer.
Quote:

Prove or disprove that a mod m + b mod m = (a + b) mod m for all integers a and b whenever m is a positive integer.

Help to Any of these would be appreciated..

thanks
• April 11th 2006, 03:13 PM
ThePerfectHacker
Code:

n^2-1 Composite
Notice that, $n^2-1=(n-1)(n+1)$ can be factored, thus it is not prime i.e. composite.
Unless, the factors are trivial, meaning that $n-1=1$ thus, $n=2$ is the only prime. Thus, $2^2-1=3$ is the only prime obtained by this function.
• April 12th 2006, 07:46 AM
CaptainBlack
Quote:

Prove that (a mod m)(b mod m) mod m = ab mod m for all integers a and b whenever m is a positive integer.
Let

$
a=k_1\times m +c_1,\ c_1 \in \{0, \dots m-1\}
$
,

and:

$
b=k_2\times m +c_2,\ c_2 \in \{0, \dots m-1\}
$
.

Then:

$
(a\mod m)(b\mod m) \equiv c_1c_2 \mod m
$

But

$
ab \mod m=\{k_1k_2 m^2 + (k_1c_2+c1k_2)m+c_1c_2\}\mod m$
$=c_1c_2 \mod m
$
.

Hence:

$
(a \mod m)(b \mod m) \mod m = ab \mod m
$

RonL