We’re rewarding the question askers & reputations are being recalculated! Read more.

# Questions tagged [modular-arithmetic]

Modular arithmetic (clock arithmetic) is a system of integer arithmetic based on the congruence relation $a \equiv b \pmod{n}$ which means that $n$ divides $a-b$.

9,832 questions
Filter by
Sorted by
Tagged with
10k views

### Why $9$ (and $11)$ are special in testing divisibility by digit sums? (casting out nines & elevens)

I don't know if this is a well-known fact, but I have observed that every number, no matter how large, that is equally divided by $9$, will equal $9$ if you add all the numbers it is made from until ...
8 views

446 views

### Wilson's theorem, $(p-2)! \bmod p$ and $(p-3)! \bmod p$

According to Wilson's theorem, when $p$ is prime $$(p-1)! \equiv p-1 \mod p$$ What's the remainder in cases of $$(p-2)! \mod p$$ or $$(p-3)! \mod p$$ Can these be solved using Wilson's theorem ...
10k views

### Prove that $(n-1)! \equiv -1 \pmod{n}$ iff $n$ is prime [Wilson's Theorem]

How can I show that $(n-1)!$ is congruent to $-1 \pmod{n}$ if and only if $n$ is prime? Thanks.
The result I am trying to prove: n-m \Biggl\lfloor \frac{n}{m} \Biggr\rfloor =1 \Leftarrow\Rightarrow n^k\equiv 1 (\operatorname{mod} m)\quad \forall k \in \mathbb N \land n,m \in \mathbb N \,\...