This note is one of many taken during 2025
Squares mod 100
Two neat little identities for squares mod 100.
n2≡(n+50)2mod100And
n2≡(50−n)2mod100These can be algebraically shown to be true
n2≡(n2+2500+100n)mod100
What about the generic case of a modulus
k? What is the specific
m to be added to
n to make the squares congruent?
n2≡(n+m)2modkExpand
n2≡(n2+m2+2mn)modkThe trivial case is for
m2≡0modk and
2mn≡0modk. Let’s just ignore the possibility that both of those aren’t true and yet still
(m2+2mn)≡0modk
The smallest natural number
m such that
2mn≡0modk for any integer
n is clearly
k/2 if
k is even, and
k if
k is odd.
The smallest natural number
m such that
m2≡0modk is a bit trickier.
m2=k2 Obviously works, but the case of
m2=(k/2)2 only works if
k is divisible by
4
m=2k
m2=22k2
km2=4kSo for
n2≡(n+m)2modkIf
k is divisible by
4
m=k/2Otherwise:
m=k
This note is one of many taken during 2025