Find Remainder of 25! Divided by 29: Help Appreciated

  • Thread starter Saitama
  • Start date
  • Tags
    Remainder
This is a relation between two expressions, and you're free to perform the same operation on both sides (just like you do in regular arithmetic).Just like how you can add/subtract/multiply/divide both sides of an equation by the same number, in modular arithmetic you can add/subtract/multiply/divide both sides by the same number. You're not doing anything different, it's just that the operations used in modular arithmetic are a little different (you use modulo, instead of division and so on).Here's an example:2x \equiv 3 (mod 5)This means, find an x such that when multiplied by 2, gives a remainder of
  • #36
Pranav-Arora said:
Thanks once again ehild! :smile:

I still don't understand how you get
6-1=5 (mod29) and what does this mean "5*6=30=1+29 "?

That's based on the definition of multiplicative modular inverse. Remember that if [itex]ax \equiv 1 \pmod n[/itex] such that [itex]0 < x < n[/itex], then x is defined as the multiplicative modular inverse of a modulo n. x is only defined if (a,n) = 1, which is a fancy way of saying the greatest common divisor of a and n is 1, which is another way of saying that a and n are coprime.

The notation for the modular inverse is [itex]a^{-1}[/itex], so here you can write: [itex]x \equiv a^{-1} \pmod n[/itex].

So, in this particular case, [itex]5 \equiv 6^{-1} \pmod {29}[/itex] because [itex](5)(6) = 30 \equiv 1 \pmod {29}[/itex], which is what ehild was highlighting.

Only two numbers give "self inverses": 1 and (n-1). This is easy to see if you solve [itex]a \equiv a^{-1} \pmod n[/itex]. Multiply both sides by a (remember this is OK, because a and n are coprime, therefore you are not multiplying by zero). So you get: [itex]a^2 \equiv 1 \pmod n[/itex], which has solutions of [itex]a \equiv \pm 1 \pmod n[/itex], so a can be 1 or (n-1).

If we suppose, x is the number we need to find here in this: 6-1=x (mod 29), how should i go on finding that?

The method to actually go about finding the inverse (when it's not trivial as discussed above) is called Euclid's algorithm. It can be implemented simply by using the "magic box" method mentioned in the wiki article on the first page. There's a cool online implementation of this algorithm that shows the steps, and here it is: http://www.cs.princeton.edu/~dsri/modular-inversion.html
 
Last edited by a moderator:
<h2>What is the formula for finding the remainder of a factorial divided by a number?</h2><p>The formula for finding the remainder of a factorial divided by a number is: n! mod m = (n mod m) * ((n-1) mod m) * ((n-2) mod m) * ... * (1 mod m)</p><h2>Can the remainder of a factorial divided by a number be negative?</h2><p>No, the remainder of a factorial divided by a number cannot be negative. It will always be a non-negative integer.</p><h2>What is the significance of finding the remainder of 25! divided by 29?</h2><p>Finding the remainder of 25! divided by 29 can be useful in various mathematical and scientific calculations, such as in number theory or cryptography.</p><h2>How can I calculate the remainder of 25! divided by 29?</h2><p>You can calculate the remainder of 25! divided by 29 by using the formula mentioned above or by using a calculator or computer program.</p><h2>Is there a shortcut method for finding the remainder of a factorial divided by a number?</h2><p>Yes, there are various shortcut methods for finding the remainder of a factorial divided by a number, such as using the Chinese remainder theorem or using modular arithmetic properties.</p>

FAQ: Find Remainder of 25! Divided by 29: Help Appreciated

What is the formula for finding the remainder of a factorial divided by a number?

The formula for finding the remainder of a factorial divided by a number is: n! mod m = (n mod m) * ((n-1) mod m) * ((n-2) mod m) * ... * (1 mod m)

Can the remainder of a factorial divided by a number be negative?

No, the remainder of a factorial divided by a number cannot be negative. It will always be a non-negative integer.

What is the significance of finding the remainder of 25! divided by 29?

Finding the remainder of 25! divided by 29 can be useful in various mathematical and scientific calculations, such as in number theory or cryptography.

How can I calculate the remainder of 25! divided by 29?

You can calculate the remainder of 25! divided by 29 by using the formula mentioned above or by using a calculator or computer program.

Is there a shortcut method for finding the remainder of a factorial divided by a number?

Yes, there are various shortcut methods for finding the remainder of a factorial divided by a number, such as using the Chinese remainder theorem or using modular arithmetic properties.

Back
Top