0

How do I calculate the remainder of $30^{29} \pmod {51}$?

I cant use Fermat's little theorem since $51$ is not a prime number.

Kenta S
  • 16,151
  • 15
  • 26
  • 53
  • Hint: compute $30^{29}\bmod 3$ (rather easy!) and $30^{29}\bmod 17$, which (by Fermat's Little Theorem) is equal to $13^{13}\bmod 17$. Further hint: $13\equiv -4\bmod 17$, so $13^2\equiv 16\equiv -1\bmod 17$. – TonyK Dec 09 '19 at 13:45
  • See also https://math.stackexchange.com/questions/1844558/how-to-find-last-two-digits-of-22016 – lab bhattacharjee Dec 09 '19 at 13:57
  • @JohnOmielan Please don't attempt to dupe close targeting that motley generic thread without explicitly pointing out which answers / methods apply, and how so. That's almost as bad as saying: "go read a book on elementary number theory". Answers should be much more specific. – Bill Dubuque Dec 09 '19 at 17:47
  • @BillDubuque I've retracted my vote, deleted the comment & will keep that in mind for the future. – John Omielan Dec 09 '19 at 17:50
  • @John Hopefully we will soon reach the point where we have some good dupe targets for all questions like this, but we're not quite there yet in my opinion (good solutions to these can involve all sorts of number theory and are often designed to motivate such). This is near the top of my dupe TODO list (pushed up mainly by Jyrki). – Bill Dubuque Dec 09 '19 at 17:52

4 Answers4

1

You could use the Chinese remainder theorem.

$x\equiv30^{29}\bmod 51\implies x\equiv0\bmod3$ and $x\equiv13^{13}\bmod 17$.

J. W. Tanner
  • 60,406
0

As $(30,51)=3$

let's find $30^{29-1}\pmod{51/3}$

Now $30\equiv13\pmod{17}$

$30^2\equiv13^2\equiv-1$

$30^{28}=(30^2)^{14}\equiv(-1)^{14}\pmod{17}$

$30\cdot30^{28}\equiv1\cdot30\pmod{17\cdot30}$

0

You could do any one of the following:

  • Chinese remainder theorem applied to the mod by factors of 51 ( 3 and 17)
  • Use negative equivalents like $30\equiv -21\pmod {51}$ , and $29\equiv -3\pmod {32}$
  • Calculate by repeated squaring and the fact $(30^7)^4\cdot 30=30^{29}$

There are tons of methods and other things you can use.

0

Put $\,a,b = 3,10\,$ below, using $\!\bmod c\!=\!17\!:\ \color{#c00}{(ab)^4} =30^4\equiv ((-4)^2)^2\equiv (-1)^2\color{#c00}{\equiv 1}$

$\ \color{#c00}{(ab)^4\equiv 1}\pmod{\!c}\,\Rightarrow\,(ab)^{1+4n}\bmod ac\overset{\rm\color{#0a0}{DL}} = a(b \color{#c00}{(ab)}^{\color{#c00}4\:\!n}\!\bmod c)= a(b)$

where we've factored out $\,a\,$ via $\, ad\bmod ac = a(d\bmod c) = $ $\rm\color{#0a0}{DL} = $ Mod Distributive Law

Bill Dubuque
  • 272,048