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 $b-a$.

learn more… | top users | synonyms

2
votes
1answer
39 views

Closed-Form Modular Arithmetic

Is there a way to define modulo division (or functions of modular arithmetic in general) as superposition of (elementary?) functions? For example, the multiplication is first introduced as ...
37
votes
13answers
5k views

How to prove that the Fibonacci sequence is periodic mod 5 without using induction?

The sequence $(F_{n})$ of Fibonacci numbers is defined by the recurrence relation $$F_{n}=F_{n-1}+F_{n-2}$$ for all $n \geq 2$ with $F_{0} := 0$ and $F_{1} :=1$. Without mathematical induction, ...
3
votes
1answer
27 views

Modular arithmetic: $P \cdot Q^{-1} \mod p$

I am reading an explanation to a programming competition, where one of the step is to calculate $P \cdot Q^{-1} \mod p$, where p is a prime. I was always doing this by calculating multiplicative ...
1
vote
1answer
24 views

Rules for modulo of bitwise xor

There are rules for modulo operation involving summation, multiplication and division. For example: ...
1
vote
0answers
36 views

Modular fractions: $5 \big| 3- \frac 12$

I've read a lot here about how modular fractions are valid as long as the denominator is invertible, but they always cause me trouble understing this part: From the definition of congruence: $$ a ...
2
votes
2answers
70 views

How can I simplify $123^{11} \mod 323$?

I am busy studying the RSA cryptosystem and would like to know how to simplify things like this: $123^{11} \mod 323$
2
votes
1answer
32 views

Congruence of 2 fractions—how to properly rewrite in terms without modulo?

EDIT: Following Theo's comment, the equivalence holds since one can (must) rewrite $1/a$ as $(1+23k)/a$. Provided that $$\frac{1}{25} \equiv \frac{1}{2}\pmod {23}$$ is true, why can I not rewrite ...
1
vote
0answers
34 views

What are modulos and how would I be able to use them to solve questions regarding the last digit of a raised power?

When given questions like "What is the last digit of the result to 3^56?", I usually look for a recurring pattern involving smaller powers of 3. In this question for example, the recurring pattern for ...
1
vote
1answer
23 views

$a\cdot(b^{-1}\bmod m)$ Can be be solved using modular multiplication

Does $a\cdot(b^{-1}\bmod m) = (a\bmod m) \cdot(b^{-1}\bmod m).$ where $\bmod$ represents remainder left on division with $m$. $b^{-1} \bmod m$ is multiplicative inverse.
6
votes
4answers
612 views

Last 10 digits of the billionth fibonacci number?

I want to compute the last ten digits of the billionth fibonacci number, but my notebook doesn't even have the power to calculate such big numbers, so I though of a very simple trick: The carry of ...
0
votes
2answers
33 views

If $g$ is a primitive root modulo $p$, then $(p-1)! \equiv g^{p(p-1)/2} \pmod{p}$

Does anyone know how to prove the following theorem: If $g$ is a primitive root modulo $p$ (and $p$ is a prime number), then $$(p-1)! \equiv g^{p(p-1)/2} \pmod{p}.$$
0
votes
1answer
31 views

The solutions to $x^m \equiv 1 \bmod p$ will all be solutions to $x^{mn} \equiv 1 \bmod p$ for any $n$.

Can you please show the proof of "The solutions to $x^m \equiv 1 \bmod p$ will all be solutions to $x^{mn} \equiv 1 \bmod p$ for any $n$."
0
votes
0answers
25 views

subsets with predefined sequences

I have a set $N=\{m,m+1,m+2,...,n\}$ And there are some generating functions of the format : $f(x,k) = (x^2 -1) \mod k$, where $k \le \sqrt m$ and $k$ is in the form $(6i+1)$ or $(6i-1)$, $\forall ...
0
votes
0answers
33 views

Rabin's cryptography - when the message $M$ isn't coprime to $n = pq$

Say the message $M$ is a product of one of the primes $p$ or $q$, won't the $gcd$ of $M$ and $n$ (the public encryption key) give me $p$ or $q$? say $p = 11$ $q=19$ $n=11*19=209$ and $M=33$. ...
2
votes
2answers
214 views

Fermat's little theorem

This is a very interesting word problem that I came across in an old textbook of mine. So I mused over this problem for a while and tried to look at the different ways to approach it but unfortunately ...
0
votes
1answer
30 views

polynomial modulo for higher degree

Given $f(x) , n, g(x)$ where $g(x)$ is usually of a small degree then if we find $h_1(x)$ such that $f(x)\equiv h_1(x)\mod \{n,g(x)\}$ , Is there any algorithm to find $h_2(x)$ such that $f(x)\equiv ...
2
votes
4answers
126 views

An easy way to calculate $12^{101} \bmod 551$?

We learn about encryption methods, and in one of the exercises we need to calculate: $12^{101} \bmod 551$. There an easy way to calculate it? We know that: $M^5=12 \mod 551$ And $M^{505}=M$ ($M\in ...
0
votes
4answers
97 views

What is the function “mod”

Surfing this site, I have often seen many functions and expressions involving $\bmod$ and I have no clue about its meaning. What does that $\bmod$ mean?
0
votes
4answers
37 views

Units digit when there is a power of power

How do you find the units digit in case of an expression like this $$ 7^{8^7} $$ I know how to find the units digit when there is one integer and there is only one power. But how do I find it when ...
0
votes
4answers
41 views

How to manually determine big number congruences

How is it possible to determine if the the following congruence is true manually, with resort to a basic calculator? The real problem here is how to do the math with a such big number? $$ 2015^{50} ...
4
votes
1answer
86 views

Find the remainder when the sum is divided by $1000$

Find $S \pmod{1000}$ given: $$S = \sum_{n=0}^{2015} n! + n^3 - n^2 + n - 1$$ $$S_0 = 0! + 0 - 0 + 0 -1 = 0$$ $$S_1 = 1! + 1 - 1 + 1 - 1 = 1$$ $$S_2 = 2! + 8 - 4 + 2 - 1 = 7$$ This isn't ...
1
vote
1answer
37 views

Polynomial function residues

If we use Euclid's representation for integers $n=aq+r$, we can write $n\equiv r \mod q$. We can also write functions similarly, for example $n(x)=a(x)q(x)+r(x)$ and so I imagine we can write ...
0
votes
0answers
19 views

One dimensional representations of $SL_2(\mathbb{Z}/n\mathbb{Z})$

Someone knows a reference or knows how to calculate the linear character of $SL_2(\mathbb{Z}/n\mathbb{Z})$, for an arbitrary $n$? Thanks
1
vote
4answers
34 views

system of modular equations.

$x\equiv 2\pmod3$ $x\equiv 3\pmod 5$ $x\equiv 7 \pmod{11}$ How can I solve this system for $x$? I've tried all kinds of things using divisibility but no success. Any hints of solutions are greatly ...
1
vote
3answers
41 views

Smallest divisible repunits

A repunit of length k is a number containing k ones (1, 11, 111...). R(k) is defined to be the repunit of length k. A(n) is the least value of k such that R(k) is divisble by n (assuming gcd(n, 10) ...
6
votes
7answers
204 views

Calculating remainder of $666^{666}$ when divided by $1000$.

I want to calculate the remainder of $666^{666}$ when divided by $1000$. But for the usual methods I use the divisor is very big. Furthermore $1000$ is not a prime, $666$ is a zero divisor in ...
4
votes
1answer
65 views

For any $n$ positive integers ($n\geq 5$) exactly 3 or 4 of them are equal to each other modulo $2^m$ for some $m$

How can one prove that for any $n$ distinct positive integers, $n\geq 5$, there exists $m$ such that exactly 3 or 4 of them are equal to each other modulo $2^m$? I tried to prove it for small $n$. ...
0
votes
0answers
26 views

Does this modulo formula change odds?

Good day, Consider 5 people each choosing a different number between [0 and A] randomly At the end, we add all the numbers: $n_1+n_2+n_3+n_4+n_5 =N$ Then modulo A+1: $W = N \pmod{A+1}$ My ...
0
votes
1answer
20 views

Intervals of integers modulo n

Do the following related concepts appear anywhere in literature? Denoting an "interval" in the integers modulo $n$ by $[i,j] = \{i, i+1, \dotsc, j\}$. For example, in modulo 6, $[5,3] = ...
0
votes
5answers
72 views

How can I prove that $4^{2012} \mod 8$ is $0$

Prove that $4^{2012} \mod 8 = 0$ I'm not really sure what rule I should use to prove this.
2
votes
4answers
80 views

Solving $x^2=17\pmod{128}$

I'm attempring to solve a congruence $x^2 \equiv 17\pmod{128}$ but not quite sure how to go about it. I see that $128 = 2^7$, but the Chinese Remainder Theorem doesn't apply to $\gcd > 1$. I found ...
2
votes
1answer
29 views

Modulo calculation with multiple exponents, via CRT

I'm aware that there are already a few questions like this but unfortunately I wasn't able to find an answer yet. $$ (14^{2014)^{2014}} \pmod {60} $$ So I started off by putting the modular in : $$ ...
0
votes
3answers
32 views

Double modular exponent with Euler-Fermat

$$7^{3^{18}} \pmod{9}$$ Using this formula : $a^{\phi(m)} \equiv 1 \pmod m$ I got $7^6 \equiv 1 \pmod{9}$ and I can write $3^{18}$ as $3^6 \cdot 3^3$ And what are next steps? I got stuck here.
3
votes
2answers
57 views

$9^{123456789} \pmod{100}$ , retrace calculation operation

I have $9^{123456789} \pmod {100}$. I did use Euler's Theorem, and got $\phi = 40$ and therefore I can say $$9^{123456789 \pmod {40}} \pmod {100}$$ this equals $ 9^{29} \pmod {100}$. Then in one of ...
-1
votes
1answer
46 views

If p is an odd prime, show that $p^2 \equiv 1 \pmod 8 $

If p is an odd prime, show that $p^2 \equiv 1 \pmod 8 $. I know that odd numbers are of the form $2k \pm 1$. Then $p^2=(2k \pm 1)^2= 4k^2 \pm 4k +1$. But it does not help to solve.
-1
votes
2answers
50 views

Is this problem correct? [duplicate]

I have found another problem in my book. I have to prove that $$2^{70}+3^{70}$$ is divisible by 13. But I have proven that $2^{70}\equiv 12 (mod 13)$ and $3^{70}\equiv 3 (mod 13)$ so it is ...
1
vote
2answers
63 views

How can I find the remainder?

How can I find the remainder when $$(12371^{56}+34)^{28}$$ is divided by $111$. I have tried congruences modulo $111$ but without any success.
2
votes
1answer
46 views

Why is $x^{100} = 1 \mod 1000$ if $x < 1000$ and $\gcd (x,1000) = 1$?

Let $U(1000) =$ the multiplicative group of all integers less than and relative prime to $1000$. "Show that for every $x \in U(1000)$ it is true that $x^{100} = 1 \mod 1000$." Been thinking ...
1
vote
3answers
43 views

What is the relation between the linear combination and modular arithmetic?

What is the relation between the linear combination and modular arithmetic? The linear combination is in a field and there must be some fundamental relation between them. What is it?
0
votes
3answers
42 views

Is it true that $x \nmid (q-1) \implies 2^x \not \equiv 1 \mod q$

If $q$ is a prime number, then from little fermat theorem it is known that $$2^{q-1} \equiv 1 \mod q$$ My doubt is that If $x \nmid (q-1)$ then $2^x \not \equiv 1 \mod q$ is true statement or not? ...
0
votes
3answers
27 views

binary representation of integers congruent 1 and 3 modulo 4

Let $k=b_nb_{n-1}\ldots b_3b_2b_1b_0$ be the binary representation of an odd positive integer. Prove: If $k\equiv 1 \mod 4$ then $b_1=0$. If $k\equiv 3 \mod 4$ then $b_1=1$. I think that to prove ...
2
votes
3answers
54 views

Let $z \in \Bbb Z_m$, when is $z^2 \equiv 1$?

Let $z \in \Bbb Z_m$. When is $z^2=1, (z\neq1)$? I know that for $m$ prime, $z=p-1$ is it's own inverse, but what about nonprime $m$? Is $p-1$ the only self inverse element in $\Bbb Z_p$ ?
-3
votes
2answers
54 views

Why is $a^{-1}$ mod $p$ equal to $a^{p-2}$ mod $p$? [closed]

Why is $a^{-1}$ mod $p$ equal to $a^{p-2}$ mod $p$ in modular arithmetic?
4
votes
3answers
55 views

Remainder when divided by 9

I'd like help with this question : What is the remainder when $$2^{2} + 22^{2} + 222^{2}+ \ldots + \underbrace{2222...22^{2}}_{49 \text{ times}} $$ is divided by $9$
6
votes
6answers
122 views

What are the last two digits of $77^{17}$?

I'm trying to solve current task referenced the following but I stuck at $\displaystyle77^{17}\equiv x\pmod{100}$. As it is described on above link it uses Binomial Theorem. But I read a lot about the ...
9
votes
0answers
94 views

Generalizing the Pell equation $x^2-61y^2 = 1$

In a table of fundamental solutions $f_1(x,y)$ to Pell equations, $$x^2-dy^2=1\tag1$$ with $d<110$, two will stand out, $$(U_{61})^6 = \big(\tfrac{39+5\sqrt{61}}{2}\big)^6 = x+y\sqrt{61} ...
3
votes
2answers
56 views

$x^2 + 3x + 7 \equiv 0 \pmod {37}$

I'm trying to solve the following $x^2 + 3x + 7 \equiv 0 \pmod {37}$ What I've tried - I've tried making the left side as a square and then I know how to solve but couldn't make it as a square ...
0
votes
1answer
36 views

What are the solutions of the equation $\phi (x) =p$ with p an prime number, x an integer and $\phi $ the Euler function.

What are the solutions of the equation $\phi (x) =p$ with p an prime number, x an integer and $\phi $ the Euler function. I have actually no idea how to start with solving this problem.
3
votes
3answers
56 views

Monic polynomial $= 0 \mod p$ for all $x$

For a monic polynomial with integer coefficients (leading coefficient of $1$) $f(x)$ where $f(x) \equiv 0$ mod $p$ for all $x$, where $p$ is a prime number how do I show that the degree of the ...
0
votes
2answers
52 views

solve $3x^2 + 6x +1 \equiv 0 \pmod {19}$

I need to solve $3x^2 + 6x +1 \equiv 0 \pmod {19}$ I saw the same problem here - Solving the congruence $3x^2 + 6x + 1 \equiv 0 \pmod {19}$ but didn't understand how he got to the conclusion ...