N*N mod 4 when N is odd

Given that N N is odd calculate N × N m o d 4 N\times N \bmod 4 .


The answer is 1.

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.

2 solutions

Chew-Seong Cheong
Nov 17, 2018

We can always express an odd integer as N = 2 n + 1 N=2n+1 , where n n is an integer. Then, we have:

N 2 4 n 2 + 4 n + 1 0 + 0 + 1 1 (mod 4) \begin{aligned} N^2 & \equiv 4n^2+4n+1 \equiv 0+0+1 \equiv \boxed 1\text{ (mod 4)}\end{aligned}

Shouldn't you expand it as 4 n 2 + 4 n + 1 4n^2 + 4n + 1 ? In this way 4 n 2 + 4 n 0 m o d 4 4n^2 + 4n \equiv 0 \mod{4} .

Hans Gabriel Daduya - 2 years, 6 months ago

Log in to reply

Thanks. I have changed it back. I was using the expansion earlier.

Chew-Seong Cheong - 2 years, 6 months ago
Srinivasa Gopal
Nov 17, 2018

Let N = (2p + 1) as N is odd Calculating N N as 4p p + 8p + 1 , we can see that the first two terms are fully divisible by 4, the last term leaves a reminder of 1 when divided by 4.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...