I believe that this may require the use of Fermat's Little Theorem. I rewrote it as $(a+1)^p - a^p \equiv 1 \pmod{p}$ because the right-hand side looks similar to Fermat's Little Theorem, but I was unable to figure out how I can get the left-hand side to become $a^{(p-1)}$.
27206
a, b are integers. p is prime. I want to prove: $(a+b)^{p} \equiv a^p + b^p \pmod p$  I know about Fermat's little theorem, but I still can't get it I know this is valid: $(a+b)^{p} \equiv a+b \pmod p$ but from there I don't know what to do.  Also I thought about $(a+b)^{p} = \sum_{k=0}^{p}\binom{p}{k}a^{k}b^{p-k}=\binom{p}{0}b^{p}+\sum_{k=1}^{p-1} \binom{p}{k} a^{k}b^{p-k}+\binom{p}{p}a^{p}=b^{p}+\sum_{k=1}^{p-1}\binom{p}{k}a^{k}b^{p-k}+a^{p}$ Any ideas?  Thanks!
56990
The problem is as stated in the title. I've tried factorization, but it doesn't seem to yield anything. Any help is greatly appreciated. Also please don't use modular arithmetic, thank you.
56173
Prove $x \equiv a \pmod{p}$ and $x \equiv a \pmod{q}$ then $x \equiv a\pmod{pq}$ for $p\neq q$ distinct primes.  Where can I start with this proof? It looks similar to the Chinese Remainder Theorem, but that deals with two different a values.
106527
I believe I see that $a_n = 2^n(a_0+1) - 1$ but am somewhat uncertain where to proceed afterwards. I am a complete beginner at number theory and would appreciate it if someone could point me in the right direction--surely there is some obvious argument I am missing.
17890
I saw the answer to  and it is the same problem, but i didn't get how to use the tip S.C.B gave. This was the tip: $"$First, assume that it is not $a$ primitive root $(\text{mod m})$. Then we have that there exists such $r&lt;\phi(m)$ such that $$a^r\equiv 1(\text{mod m})$$ Now use that, if $n=mk$ $$ϕ(mk)=ϕ(m)ϕ(k)\frac{d}{ϕ(d)}≥ϕ(m)ϕ(k)&gt;rϕ(k)$$ where $d=gcd(m,k)"$ and i saw the answer to this question using group theory, but i want an answer using elementary number theory, if you have a different answer, or tip, it would be good as well. What i tried was this: $n=mk$, then $$a^{\phi(n)}\equiv 1(\text{mod n})\Rightarrow a^{\phi(mk)}\equiv1(\text{mod mk}) \Rightarrow a^{\phi(mk)}\equiv1(\text{mod m})$$ But i don't know how to follow from here
83924
I've stumbled upon this congruence very similar to Fermat's Little Theorem, but I can't seem to wrap my head around how to solve it. It goes like this:     i) Suppose $p$ is prime, $(a,p)=1$ and the congruence $x^2 \equiv a \pmod p$ has a solution $x$. Prove that $a^{(p-1)/2}\equiv 1 \pmod p$.   And the same question but with an additional condition:     ii) Suppose $p$ is prime, $p \equiv 3  \pmod 4$, $(a,p) = 1$ and the congruence $x^2 \equiv a \pmod p$ does not have a solution $x$. Prove that $a^{(p-1)/2}\equiv -1 \pmod p$.   For i: Since $x^2 \equiv a \pmod p$ has a solution, we know that $p \mid x^2 - a$, hence $kp=x^2-a$ for some integer $k$, or $a = x^2-kp$. Now this doesn't really help me much!  For ii: Similarly stumped.
102793
For the special case $ab \equiv 1 \pmod{p}$, I already got very clear explanation from Arturo Magidin and Quanta in this thread   Now if $ab \equiv r \pmod{p}$, what condition need to be hold in order for this to be true, i.e If $a$ is quadratic residue modulo $p$, then $b$ is also quadratic residue modulo $p$. My attempt was, I made a concrete example to observe the value of $r$, says $p = 7$. The results are: 1, 4, 5  $$1^2 \equiv 1 \pmod{7}$$ $$2^2 \equiv 4 \pmod{7}$$ $$3^2 \equiv 2 \pmod{7}$$ $$4^2 \equiv 1 \pmod{7}$$ $$5^2 \equiv 4 \pmod{7}$$ $$6^2 \equiv 1 \pmod{7}$$  So $r$ could be $1$, $2$, $4$, since $4.4 \equiv 1 \pmod{7}$ and $4.2 \equiv 1 \pmod{7}$. From these results, I saw that $r$ was also quadratic residue modulo $p$.  Another idea that I tried is adapting the proof from the mentioning thread above: If $ab \equiv r \pmod{p}$, then  $$aa^{-1}b \equiv ra^{-1} \pmod{p} \Leftrightarrow b \equiv ra^{-1} \pmod{p}$$ $$bb^{-1}a \equiv rb^{-1} \pmod{p} \Leftrightarrow a \equiv rb^{-1} \pmod{p}$$  Then I tried to use the fact that $x^2 \equiv a \pmod{p}$, and $a \equiv rb^{-1} \pmod{p}$ to come with $x^2 \equiv rb^{-1} \pmod{p}$. But I could not find a way to express this in term of $y^2 \equiv b \pmod{p}$. Furthermore, I don't know if this algebraic manipulation could solve the condition for $r$ or not. Any idea? A hint would be greatly appreciated.  Thank you
83856
I also have to prove this for $$2^2 \times 4^2 \times 6^2 \cdots \times (p-1)^2 \equiv (-1)^{(p+1)/2} \pmod{p}$$ I made some progress so far and got stuck. I said that since p is odd, $(p+1)/2$ is even. Then we can say that $(-1)^{\mathrm{even}}= 1$, so $(-1)^{(p+1)/2}\pmod{p}$ can be written as $1\pmod{p}$. I know that the product of odds is odd and the product of evens is even, but I cant prove that the left side of this equation in either case is congruent to $1 \pmod{p}$. Any help here would be greatly appreciated.
81465
Show that   $$(p-1)!\left(1+\dfrac{1}{2}+\dfrac{1}{3}+\cdots+\dfrac{1}{p-1}\right)\equiv 0\pmod{p^2}.$$   Maybe use this $$\dfrac{1}{k}+\dfrac{1}{p-k}=\dfrac{p}{k(p-k)}$$ and then I can't. Can you help me to prove it?   Thank you.
44874
$$\text{ If } p \neq 2 \text{ is a prime, we know that: }$$ $$\left(\left(\frac{p-1}{2}\right)!\right)^2 \equiv (-1)^{\frac{p+1}{2}} \pmod p$$  According to this,prove that: $$p \equiv 1 \pmod 4 \Rightarrow x^2+1\equiv 0 \pmod p \text{ has a solution}$$ $$\text{Which is the solution?}$$ Solve: $\displaystyle{ x^2+1 \equiv 0 \pmod{29} \text{ , } x^2+1 \equiv 0 \pmod{37}}$  Inversely,prove that $x^2+1 \equiv 0 \pmod p \text{ has a solution } \Rightarrow p \equiv 1 \pmod 4$  I have thought the following:   $$\left(\left(\frac{p-1}{2}\right)!\right)^2-(-1)^{\frac{p+1}{2}} \equiv 0 \pmod p \Rightarrow \left(\left(\frac{p-1}{2}\right)!\right)^2+(-1)^{\frac{p+3}{2}} \equiv 0 \pmod p $$   As $p=4k+1$, $(-1)^{\frac{p+3}{2}}=(-1)^{\frac{4k+4}{2}}=1$  So,we have: $$\left(\left(\frac{p-1}{2}\right)!\right)^2+1 \equiv 0 \pmod p$$  So,we conclude that $x^2+1 \equiv 0 \pmod p \text{ has a solution , this one: } (\frac{p-1}{2})!$  Is it right or have I done something wrong?   So,are the solutions of $x^2+1 \equiv 0 \pmod{29} \text{ and } x^2+1 \equiv 0 \pmod{37}$,these one: $\displaystyle{(14)! \text{ and } (18)! \text{ respectively}}$ ? Are these the only solutions?? How can I show the inverse?
83575
Does anyone know how to show this preferable without using modular  For any prime $p&gt;3$ show that 3 divides $2p^2+1$
28336
Find all positive integers $n$ such that $a \equiv a^{-1} \pmod{n}$ for all invertible $a$ modulo $n$.   I found that $n = 1,2,4,6,8,12,24$ satisfy this. How can we prove that these are all of them?
63331
So I know that if $(a,n)=1$, then $a^{\phi(n)}≡1\pmod{n}$ by Euler's Theorem. I also know that $d \mid a^k$ and obviously $d \mid n$. I know I probably need to use this in the proof, but I just don't know how to get started.
15178
When I am faced with a simple linear congruence such as  $$9x \equiv 7 \pmod{13}$$ and I am working without any calculating aid handy, I tend to do something like the following:  "Notice" that adding $13$ on the right and subtracting $13x$ on the left gives: $$-4x \equiv 20 \pmod{13}$$  so that $$x \equiv -5 \equiv 8 \pmod{13}.$$  Clearly this process works and is easy to justify (apart from not having an algorithm for "noticing"), but my question is this: I have a vague recollection of reading somewhere this sort of process was the preferred method of C. F. Gauss, but I cannot find any evidence for this now, so does anyone know anything about this, or could provide a reference? (Or have I just imagined it all?)  I would also be interested to hear if anyone else does anything similar.
3478
Isn't finding the inverse of $a$, that is, $a'$ in $aa'\equiv1\pmod{m}$ equivalent to solving the diophantine equation $aa'-mb=1$, where the unknowns are $a'$ and $b$? I have seem some answers on this site (where the extended Euclidean Algorithm is mentioned mainly) as well as looked up some books but there is no mention of this. Am I going wrong somewhere or is this a correct method of finding modular inverses? Also can't we find the Bézout's coefficients by solving the corresponding diophantine equation instead of using the extended Euclidean Algorithm?
38927
How can I show that $(n-1)!\equiv-1 \pmod{n}$ if and only if $n$ is prime? Thanks.
63744
Prove that:  $$a^{2^n} \equiv 1\pmod{2^{n+2}}$$  I have done the base case, and then have an assumption that:  $$a^{2^k} \equiv 1 \pmod {2^{k+2}}$$  I wish to prove the last step, that:  $$a^{2^{k+1}} \equiv 1 \pmod{2^{k+3}}$$  How would I do this?