Discrete Mathematics with Applications 4th Edition

Published by Cengage Learning
ISBN 10: 0-49539-132-8
ISBN 13: 978-0-49539-132-6

Chapter 4 - Elementary Number Theory and Methods of Proof - Exercise Set 4.4 - Page 190: 29

Answer

See below.

Work Step by Step

(a) Let $n$ be any integer, case1: $n=3m+0$, we have $n^2=9m^2=3(3m^2)$, thus $k=3m^2$ case2: $n=3m+1$, we have $n^2=9m^2+6m+1=3(3m^2+2m)+1$, thus $k=3m^2+2$ case3: $n=3m+2$, we have $n^2=9m^2+12m+4=3(3m^2+4m+1)+1$, thus $k=3m^2+4m+1$ As the remainder can only be $0,1,2$, in any case, we can write $n^2$ in the form of $3k$ or $3k+1$ (b) Let $n$ be any integer, case1: $n$ mod $3=0$, we have $n^2=9m^2=3(3m^2)$, thus $n^2$ mod $3=0$, case2: $n$ mod $3=1$, we have $n^2=(3m+1)^2=9m^2+6m+1=3(3m^2+2m)+1$, thus $n^2$ mod $3=1$, case3: $n$ mod $3=2$, we have $n^2=(3m+2)^2=9m^2+12m+4=3(3m^2+4m+1)+1$, thus $n^2$ mod $3=1$, As the remainder can only be $0,1,2$, in any case, we have $n^2$ mod $3=0$ or $n^2$ mod $3=1$
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.