For questions about congruences in modular arithmetic, concerning for example the chinese remainder theorem, Fermat's little theorem or Euler's totient theorem.

# Questions tagged [congruences]

1737 questions

**88**

votes

**5**answers

### How to solve these two simultaneous "divisibilities" : $n+1\mid m^2+1$ and $m+1\mid n^2+1$

Is it possible to find all integers $m>0$ and $n>0$ such that $n+1\mid m^2+1$ and $m+1\,|\,n^2+1$ ?
I succeed to prove there is an infinite number of solutions, but I cannot progress anymore.
Thanks !

uvdose

- 727
- 10
- 20

**79**

votes

**3**answers

### Mathematicians shocked(?) to find pattern in prime numbers

There is an interesting recent article "Mathematicians shocked to find pattern in "random" prime numbers" in New Scientist. (Don't you love math titles in the popular press? Compare to the source paper's Unexpected Biases in the Distribution of…

Tito Piezas III

- 47,981
- 5
- 96
- 237

**45**

votes

**8**answers

### Why is $a^n - b^n$ divisible by $a-b$?

I did some mathematical induction problems on divisibility
$9^n$ $-$ $2^n$ is divisible by 7.
$4^n$ $-$ $1$ is divisible by 3.
$9^n$ $-$ $4^n$ is divisible by 5.
Can these be generalized as
$a^n$ $-$ $b^n$$ = (a-b)N$, where N is an integer?
But…

z_z

- 557
- 1
- 5
- 6

**29**

votes

**13**answers

### Why do we use "congruent to" instead of equal to?

I'm more familiar with the notation $a \equiv b \pmod c$, but I think this is equivalent to $a \bmod c = b \bmod c $, which makes it clear that we should put a $=$ instead of $\equiv$.
What's the reason for the change of sign? If it's to emphasize…

YoTengoUnLCD

- 12,844
- 3
- 35
- 89

**20**

votes

**4**answers

### Is the number $333{,}333{,}333{,}333{,}333{,}333{,}333{,}333{,}334$ a perfect square?

I know that if the number is a perfect square then it will be congruent to $0$ or $1$ (mod $4$). Now since the number is even, I know that it is either $0$ or $2$ (mod $4$). How would I go about answering this?

user46372819

- 11,076
- 12
- 55
- 124

**16**

votes

**2**answers

### Solve congruence: $45x \equiv 15 \pmod{78}$ (What am I doing wrong?)

Question about solving congruence. I've worked out how to solve them for the most part except for the following problem I'm having:
$$45x \equiv 15 \pmod{78}$$
By the euclidean algorithm, I work out that the gcd of 45 and 78 = 3 which means there…

Arvin

- 1,667
- 4
- 23
- 33

**16**

votes

**1**answer

### Flaw or no flaw in MS Excel's RNG?

I have a question about my understanding of an article of B.D. McCullough (2008) about Excel's implementation of the Wichmann-Hill random number generator (1982).
First, a bit of context
The Wichmann-Hill algorithm is given in AS 183 here. As one…

Jean-Claude Arbaut

- 21,855
- 7
- 47
- 78

**14**

votes

**3**answers

### Show that for every prime $p$, there is an integer $n$ such that $2^{n}+3^{n}+6^{n}-1$ is divisible by $p$.

So the problem states: Show that for every prime $p$, there is an integer $n$ such that $2^{n}+3^{n}+6^{n}-1$ is divisible by $p$.
I was thinking about trying to prove this using the corollary to Fermat's Little Theorem, that for every prime $p$, …

mataxu

- 197
- 6

**12**

votes

**4**answers

### Divisibility rules and congruences

Sorry if the question is old but I wasn't able to figure out the answer yet.
I know that there are a lot of divisibility rules, ie: sum of digits, alternate plus and minus digits, etc... but how can someone derive those rules for any number $n$…

Tarantula

- 252
- 2
- 6

**12**

votes

**4**answers

### Is there a sequence of 5 consecutive positive integers such that none are square free?

Is there a sequence of 5 consecutive positive integers such that none are square free? A number is square free if there is no prime number p such that $p^2 \mid n$
What I've tried doing so far is to show that for every sequence of 5 integers there…

andrew749

- 205
- 2
- 6

**11**

votes

**2**answers

### Identity involving pentagonal numbers

Let $G_n = \tfrac{1}{2}n(3n-1)$ be the pentagonal number for all $n\in \mathbb{Z}$ and $p(n)$ be the partition function. I was trying to prove one of the Ramanujan's congruences: $$p(5n-1) = 0 \pmod 5,$$ and my "brute force" proof reduces to show…

Zilin J.

- 4,215
- 11
- 21

**10**

votes

**6**answers

### Proof that there are infinitely many primes congruent to 3 modulo 4

I'm having difficult proving this.
As a hint the exercise to prove first, that if $a\lneqq \pm 1$ satisfies $a \equiv 3 \pmod4$, then exist $p$ prime, $p \equiv 3 \pmod 4$ such $p\mid4$. But I'm not really getting for what purpose can this be used.

FranckN

- 1,254
- 5
- 13
- 25

**10**

votes

**2**answers

### How to solve congruence $x^y = a \pmod p$?

I'm having trouble solving this congruence:
$$x^{114} \equiv 13 \pmod {29}.$$
I thought that it made sense to try to solve it using this idea: "Suppose you want to solve the congruence $ x^y \equiv a \pmod p$ (we will assume for the moment
that $p$…

Amber

- 369
- 2
- 11

**10**

votes

**2**answers

### Is the finite sum of factorials constant modulo the summation limit?

The answer to the following question would give an alternative solution to an old olympiad question if it is true.
Prove that there is no (constant) integer $c$ such that
$$1!+2!+\dots + q! \equiv c \bmod q \text{ for all $q \in \mathbb…

Tara

- 394
- 1
- 2
- 13

**10**

votes

**2**answers

### Show $a^p \equiv b^p \mod p^2$

I am looking for a hint on this problem:
Suppose $a,b\in\mathbb{N}$ such that $\gcd\{ab,p\}=1$ for a prime $p$. Show that if $a^p\equiv b^p \pmod p$, then we have: $$a^p \equiv b^p \pmod {p^2}.$$
I have noted that $a,b$ are necessarily coprime to…

anak

- 1,088
- 13
- 27