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$.
13,370 questions
-1 votes
0 answers
32 views
Adding a number to a multiple of nine does preserve its digital root. [duplicate]
If we add any number to a multiple of nine, then the summation of the digits of the addent (till it comes to single digit)is equal to the summation of the digits of the result(till it comes to single ...
1 vote
1 answer
53 views
Order of a polynomial $P\pmod{n}$
Let $P$ be a polynomial in $\mathbb{Z}[X]$ and $n \geq 1$ be an integer. Consider the vector $\left(P(0), P(1),\ldots,P(n-1) \right) \pmod{n}$ Now apply $P$ again, and again, pointwise to the vector, ...
1 vote
1 answer
76 views
Is there a term for [a - x(mod(a))]?
I found this code snippet in a code base, and the function is obviously named wrong: const mod11 = (value: number): number => 11 - (value % 11); But it is not &...
-1 votes
1 answer
70 views
Find the remainder (factorial with Wilson's theorem) [duplicate]
"Find the reminder of $(1001!\cdot 994!)^{19961} (\text{mod} 1997)$ if we know $1997$ is a prime number." Okay so that means: $$x\equiv (1001!\cdot 994!)^{19961} (\text{mod} 1997)$$ we know ...
-2 votes
1 answer
51 views
Is the product of two $k$-th power non-residue a $k$-th power residue? [closed]
Let $p$ be a prime, then $a\in\{0,\dots, p-1\}$ is a $k$-th power residue modulo $p$ if there exists some integer $x$ such that $x^k\equiv a $(mod $p$) and a $k$-th power non-residue otherwise. It is ...
0 votes
0 answers
43 views
Stabilization of one new trailing digit of $a^{10^b}$ as $b$ increases, for every $a$ not divisible by $10$
Let $a,b \in \mathbb{N}-\{0,1\}$ be such that $10 \nmid a$. Then, define $S_a(b) := \nu_{10}(a^{10^{b+1}} - a^{10^b})$ and $D_a(b) := S_a(b) - S_a(b-1)$. So, $S_a(b)$ counts the number of common ...
11 votes
1 answer
295 views
Can a bivariate polynomial evaluated modulo 9 produce a valid Sudoku grid?
Can a bivariate polynomial with integer coefficients $f\colon \mathbb{Z}\times\mathbb{Z}\to\mathbb{Z}$ generate a valid $9\times 9$ Sudoku grid, when evaluated modulo 9? A consequence is that for ...
3 votes
1 answer
133 views
Periodicity of the iterated sequence modulo powers of 3
I'm studying the sequence $(u_k)$ defined by $u_0 = -1$ and $u_{k+1} = u_k^2+1$. I'm particularly interested in its periodic behavior modulo powers of 3. To prove that $(u_k \pmod{3^m})$ has period $T$...