0

I am trying to calculate $5^{144}\pmod{315}$.

I started by calculating φ(315) = φ(9) × φ(7) × φ(5) = 144, but I don't know how to continue from here.

I think I am stuck because $\gcd(5,315)=5$ and not $$, e.g. if I needed to find $4^{144}$ I'd say that since $φ = 144$ and $\gcd(4,315)=1$ we can deduce that $4^{144}=1\pmod{315}$ I suppose it should have something to do with φ being equal to the exponent, but I'm honestly not sure. If φ wasn't equal to the exponent would I be able to use the same method?

Thanks in advance!

MJD
  • 65,394
  • 39
  • 298
  • 580
QWERTY123
  • 9
  • 1
  • Euler's theorem says $a^{\phi (n)}\equiv 1\bmod n$ for coprime $a$ and $n$, but you can use this post, too. – Dietrich Burde May 17 '23 at 15:09
  • For this particular problem, with the modulus $315$, there is a trick. Note that $5^4=625\equiv −5 \bmod 315$ and $(−5)^4 \equiv −5 \bmod 315$. So $5^{144}\equiv(−5)^{36}\equiv (−5)^9\equiv (-5)^3 \equiv 190 \bmod 315$. True, this could be solved using the methods in the linked dups, but noticing special properties of stated problems can save lots of work. The solution I propose can be worked out in your head in a few seconds. Insisting that this be approached by another method (i.e. labelling it a dup) cheats OP and the readership out of a novel answer. – Keith Backman May 17 '23 at 20:13
  • @Bill Dubuque BTW Even though $\phi(5)\mid 24$, $5^{24} \not \equiv 1 \bmod 5$ – Keith Backman May 18 '23 at 14:00
  • $5^{144}\bmod 5(63) = 5(5^{\color{#c00}{143}}\bmod 63) = 5((!\overbrace{5^{\color{#c00}3}5^{\color{#c00}2}}^{\large!! !(-1),5^2}!! \bmod 63) = 5(38),$ by $,\color{#c00}{143\equiv 5}\pmod{!\color{#0a0}6},,$ & $,5^{\color{#0a0}6}\equiv 1\bmod 7,9,$ so also $!\bmod 7\cdot 9=63,,$ by mod $\rm\color{#c00}{order}$ reduction, and Euler $\phi$ & lcm/CCRT – Bill Dubuque May 18 '23 at 18:02
  • @Keith That was supposed to be for $,4^{144}$ in the OP. See above for $,5^{144}.,$ Of course (esp. for small moduli) we can often use ad-hoc methods, but they usually don't scale well to larger moduli. Here the general method I used is actually less mental work for me than your ad-hoc method, and likely uses the general techniques that the the problem was meant to exercise. – Bill Dubuque May 18 '23 at 19:01

0 Answers0