# Arithmetics in Z

1. Sep 24, 2011

### naoufelabs

Hello all,

I have a problem to define a set of natural numbers that meet the following equation:

m2+1$\equiv$0[5]

I have found that a set of this equation is : {2,3,7,8}+k*10, k$\in$N
i.e: k= {0,1,2,3,...........,n}
example: (2+(0*10)2)+1=5
(3+(1*10)2)+1=132+1=170

Result: m=[2+k*10; 3+k*10; 7+k*10; 8+k*10]

How can I describe this result logically in mathematics ?

Thanks.

2. Sep 24, 2011

### dodo

Hello,
I think you more or less did: m is congruent to either 2, 3, 7 or 8 modulo 10.

Notice that this is equivalent to saying that m is congruent to either 2 or 3 modulo 5, since $2 \equiv 7 \pmod 5$ and $3 \equiv 8 \pmod 5$.

You wanted a solution of the equation $m^2 \equiv -1 \equiv 4 \pmod 5$; you only need to square each of 0,1,2,3,4 modulo 5, and see which are congruent to 4.

Hope this helps!

3. Sep 24, 2011

### RamaWolf

Look at sequence A047221 in OEIS ('Numbers that are congruent to {2, 3} mod 5')

4. Sep 29, 2011

### naoufelabs

Hello,
m2+1 $\equiv$ 0[5]
m2 $\equiv$ -1[5]
m2 $\equiv$ 4[5]
m $\equiv$ $\pm$2[5]
m $\equiv$ 2,3[5]
therefore : m= {2+5n ; 3+5n} for any integer n$\geq$0