How do I calculate    $2^{65536} \pmod{2^{31} -1}$  $3^{256} \pmod{2^8 +1}$   Please help?
1687
How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .
106448
What is the remainder when $2^{2016}$ is divided by $47$?   I have done Fermat's little theorem and I have now this:  $2^{2016} \equiv 2^{38} \pmod{47}$  My issue is that $2^{38}$ is too large of a number to work with, how do I continue?
108341
How to solve and see resolution of $13^{53} \pmod 7$ using Fermat little Theorem? Using , I know it gives me 6 as an answer to this problem..., but why? How is the resolution? Thanks,
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.
120507
What is the correct answer to this expression:    $26^{32}  \pmod  {12}$    When I tried in Wolfram Alpha the answer is $4$, this is also my answer using Fermat's little theorem, but in a calculator the answer is different, $0.$
32197
For what values of $m,n$ natural, do $2^n - 1$ is divisible by $2^{m+n} - 3^m$?  Thank you very much.
6856
Here is a problem which i have not been able to do for quite sometime.   For $n \geq 2$, show that $n \nmid 2^{n}-1$.   I have thought of proving this in two ways: One by using induction which didn't actually work. Next by Fermat's little theorem we have $2^{p-1} \equiv 1 \ (\text{mod} \ p)$, which actually says that for $p \mid 2^{p}-2$. But i couldn't proceed more than this. Any ideas by which i can actually solve the problem?
56958
I don't really see too many sites explaining how this is done. Does anyone know how this works? I'm trying to find $\binom{n}{k}\bmod m$, where $n$ and $k$ are large and $m$ is not prime. I think it can be done with the Chinese remainder theorem, but I don't understand how it is all put together.
113764
I'm stuck at the following question: let $d$ divide $2^{2^n} +1 $. Show that $d \equiv 1 \pmod{2^{n+1}}$.  All I've managed to do so far was to notice that $2^{n+1} \mid 2^{2^n}$ for every natural $n$, so if $dl = 2^{2^n} + 1$, we have $dl \equiv 1 \pmod{2^{n+1}}$ - which merely states that $d$ is invertible, which is trivial since it is odd. This is homework, are there any hints?
957
Show that    $$1^{p-1} + 2^{p-1} +\ldots + (p-1)^{p-1} \equiv -1 \mod p$$   So, I use Fermat's little theorem, that is if $p$ does not divide $a$, then $a^{p-1}$ is congruent to $1$ (mod $p$). But I'm still confused. If $1^{p-1}$ is congruent to $1$ (mod $p$), $2^{p-1}$ is congruent to $1$ (mod $p$), and $p$ does not divide $p-1$, so $(p-1)^{p-1}$ is congruent to $1$ (mod $p$). How does that equal $-1$ (mod $p$)?
86075
I can't solve this problem; it may be easy though.  Is the number $2^{1093} -2$ a multiple of $1093^2$?  I do appreciate any kind of help.
85732
Find the inverse modulo,  Modulo inverse of $5991 \pmod{2014}$ ?  I am aware of the Euclid algorithm, but I am not sure how to apply it here?
68081
Highest power of two that divided $3^{1024}-1$     Q: I did from binomial and expansion but is there a smarter way ?   My approach : $ 3^{1024}-1 $ can be $(3^{512} + 1)$ and $(3^{512} – 1)$ $\quad $Again $( 3^{512} – 1 )$ is written as $( 3^{256} + 1 )$ and $( 3^{256} – 1)$ $\quad \quad $Again $( 3^{256} – 1 ) $ is written as $( 3^{128} + 1 )$ and $( 3^{128} – 1)$ $\quad \quad \quad $Again $( 3 ^{128} – 1 )$ is written as $( 3^{64} + 1 )$ and $( 3^{64} – 1)$ $\quad \quad \quad \quad $Again $( 3^{64} – 1 )$ is written as $( 3^{32} + 1 )$ and $( 3^{32} – 1)$ $\quad \quad \quad \quad \quad $Again $( 3^{32} – 1 )$ is written as $( 3^{16}+ 1 )$ and $( 3^{16} – 1)$ $\quad \quad \quad \quad \quad \quad $Again $( 3^{16}– 1 )$ is written as $( 3^{8}+ 1 )$ and $( 3^{8} – 1)$ $\quad \quad \quad \quad \quad \quad \quad $Again $( 3^{8} – 1 )$ is written as $( 3^{4} + 1 )$ and $( 3^{4}– 1)$ $\quad \quad \quad \quad \quad \quad \quad \quad $Again $( 3^{4}– 1)$ is written as $(3^{2} + 1)$ and $( 3^{2} – 1)$    $\quad \quad \quad \quad \quad \quad \quad \quad \quad $Again $( 3^{2} – 1)$ is written as $( 3^{1} + 1 )$ and $( 3^{1} – 1)$ $\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad $or $ 2^2 $and$ 2^1$          Now it can be observed that each of $( 3^{512} + 1), ( 3^{256} + 1) , ( 3^{128} + 1) , ( 3^{64} + 1)$ , $( 3^{32} + 1)$ , $(3^{16} + 1) , (3^{8} + 1)$ , $(3^{4} + 1) , ( 3^{2} + 1)$ is divisible by $2$ but not by $ 2^{2}$.              In other words, maximum power of $2$ that can divided each of $( 3^{512}+ 1), ( 3^{256}+ 1) $ , $ ( 3^{128} + 1) , ( 3^{64}+ 1)$ , $( 3^{32} + 1) , (3^{16} + 1) , (3^{8} + 1) $,$ (3^{4} + 1)$ and $( 3^{2} + 1)$ is $1$.           As they are total $9$ terms hence expression is divisible by $2^9$ and rest two terms $2^2$ and $2^1$ will be divisible by $2^3$. Hence, maximum power of $2$ that can divide $3^{1024} – 1$ is $12$.
37047
A student of mine has been self-studying some elementary number theory. She came by my office today and asked if I had any hints on how to prove the statement      If $m$ is odd then $\gcd(2^m-1,2^n+1)=1$.    It's been a while since I took number theory and I'm not sure what to do. She said she is learning about congruences, primitive roots, and power residues.  She has not taken any group theory.
61650
Find all solutions to $x^9 \equiv 25 \pmod {29}$   I referred to a table of indices in the back of my book for help but am still a bit confused, any help/hints are greatly appreciated.
59925
Given the positive integer numbers $n$,prove that $$\sum_{k=1}^{2^{n-1}}\sigma{(2^n-2k+1)}\sigma{(2k-1)}=8^{n-1}$$  where $\sigma(n)$ is defined as $$\sigma{(N)}=\sum_{d|N}d$$  This problem I think is very interesting, and have nice methods?  Thank you everyone.  and I find some of this     or can see:
70953
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)}$.