Part 4: congruence
Definition: see here .
Topic 1: About modulo
First push a very simple formula:
$$ab\; \mod c=(a \mod \;c) \;\cdot\; b \mod \;c$$
prove:
易知 $a=\lfloor \frac{a}{c} \rfloor \cdot c+a \mod c.$
所以:
$$ab \mod c$$
$$=(\lfloor \frac{a}{c} \rfloor \cdot c \mod \;c\;+\;a \mod c )\;\cdot\; b \mod c$$
$$=0\;+\;a\mod \;c\; \cdot \;b \mod c$$
$$=(a\mod \;c)\; \cdot \;b \mod c.$$
Characterized completely square numbers: Topic 2
① $a^2 \mod 3=0\;\;or\;\;1.$
prove:
When the $ 3 \ mid a $, apparently $ 3 \ mid a ^ 2 $;
When $ a \ mod 3 = 1 $, set $ a = 3k + 1 $, $ k $ is an integer, then
$$a^2$$
$$=9k^2+6k+1$$
$$ = 3 (3k ^ 2 + 2k) +1. $$
Therefore, at this time $ a ^ 2 \ mod 3 = 1 $;
When $ a \ mod 3 = 2 $, the set $ a = 3k + 2 $, $ k $ is an integer, then
$$a^2$$
$$ = 9k ^ 2 + 12k + 4 $$
$$=3(3k^2+4k+1)+1.$$
Therefore, at this time $ a ^ 2 \ mod 3 = 1 $.
In summary, for any integer $ A $, satisfy the above properties.