1

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?

  • You can try the tricks suggested by the answerers, or you can take a peek at the quite extensive list of techniques described here. It would make life simpler for everybody, if the techniques were all collected there, but some answerers prefer to repeat themselves, and some others prefer to keep a few tricks up their sleeves :-) – Jyrki Lahtonen Aug 24 '16 at 20:32
  • @Jyrki This is certainly not a duplicate of the target. Please reverse your unilateral closing. You seem to have a very strong bias against elementary questions. Yet these are some of the best ways to learn (and teach) basic ideas in number theory and algebra. – Bill Dubuque Aug 25 '16 at 14:30
  • 1
    @JyrkiLahtonen thanks for the link, but it does not address this particular problem so i dont see how its a duplicate. – user6395724 Aug 26 '16 at 16:00
  • @user6395724 Some of the techniques described there surely work here as well. For example square-and-multiply or quadratic residues. Namely $2\equiv7^2\pmod{47}$, so $2$ is a quadratic residue implying that $2^{23}\equiv1\pmod{47}$ leaving you with a manageable $2^{15}$ to calculate. More importantly, the other similar questions linked to that "main" question describe many other shortcuts you can use. – Jyrki Lahtonen Aug 26 '16 at 19:01
  • I hope you enjoy studying those techniques, and determining which of them work better in your case, and why. That is the true benefit of that target. The journey is more important than the destination. – Jyrki Lahtonen Aug 26 '16 at 19:04
  • @JyrkiLahtonen can't argue with that – user6395724 Aug 27 '16 at 16:45
  • 1
    @user6395724 Don't be misled by the above comments. The beauty of number theory (and mathematics) is that often there are many ways to solve problems, and often one is surprised to discover new ways to view them. Much of number theory (and abstract algebra) was discovered by so-called experimental (elementary) number theory. Much would never have been discovered if students were forced to think about problems only in certain ways. As Cantor said, the essence of mathematics lies precisely in its freedom.. SE cannot rob you of that freedom (though some will try to). – Bill Dubuque Aug 27 '16 at 17:00
  • @BillDubuque I appreciate the eye opener and tremendous input, it got me motivated for further math studies. The exam was the day after i created the thread and i got a similar question actually, i ended up with 2^14 which was manageable so i didn't have to apply any of the suggested methods, but the more you know right. – user6395724 Aug 27 '16 at 17:19

2 Answers2

6

Hint $\,\ \underbrace{2^{38}\equiv 2^{-8}}_{\large 2^{\Large 46}\equiv 1\text{ by F$\ell$T}}\!\!\! \equiv (2^{-4})^2\equiv \underbrace{(\color{#c00}{16^{-1}})^2\equiv \color{#c00}{3}^2}_{\large 16(3)\ \equiv\ 48\ \equiv\ 1}\equiv 9\pmod{47},\ $ all trivial mental arithmetic

Remark $ $ As in the example above, generally it is trivial to invert $\,a\pmod n\ $ if $\ a\mid n+1 $ since if $\ ab = n+1\,$ then $\ {\rm mod}\ n\!:\ ab\equiv 1\,\Rightarrow\, a^{-1}\equiv b.\ $ Similarly if $\ a\mid n-1.\ $ These trivial inversions are special cases of computing inverses using the extended Euclidean algorithm (cases where the algorithm terminates in $1$ or $2$ steps).

Bill Dubuque
  • 272,048
  • OK, I'm going to have to research this modular fraction thingy. That looks bizarre to me but I dare not say it's wrong! :) – John Aug 24 '16 at 19:58
  • 1
    @John Fractions with denominator coprime to the modulus are well-defined (viz. $,a/b \equiv ab^{-1}),$ and the usual high-school fraction arithmetic laws remain valid. You can find many examples in my prior posts. – Bill Dubuque Aug 24 '16 at 20:04
  • 1
    @John I eliminated the fractions and simplified it, so now it should be more accessible. – Bill Dubuque Aug 24 '16 at 20:42
  • Very much appreciate the explanation! – John Aug 25 '16 at 14:15
  • I appreciate you describing many ways to think about these elementary calculations. If only all the prolific answerers to questions about modular arithmetic did the same. I closed the question partly to pre-empt pointless repetitions of old answers. If you feel that other useful answers could be forthcoming feel free to use your gold badge vote to reopen - not that you would need my permission for that in the first place :-) – Jyrki Lahtonen Aug 25 '16 at 15:50
  • @Jyrki Unfortunately your method of "pre-empting pointless repetitions of old answers" has a very bad side-effect. Namely it aborts many pearls. Please let the community decide these matters. If you insist on doing so please do so only when the question is unquestionably an exact duplicate. – Bill Dubuque Aug 25 '16 at 15:57
  • Bill, I simply view that it is better to collect the pearls to the same place, where they can be seen and enjoyed by all rather than scatter them over hundreds of threads. It doesn't have to be a single thread, but I fail to see what pearls I am pre-empting. Anyway, if the voters want to reopen this, they can. – Jyrki Lahtonen Aug 25 '16 at 16:06
3

You can say $2^{38}=(2^{10})^32^8$ and take each factor $\bmod 47$, then multiply them out.

Ross Millikan
  • 374,822