Factorial Division Remainder

Find the remainder when 70 ! 70! is divided by 5183 5183 .

Note: Don't use a computational device!


The answer is 1277.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Mathh Mathh
Aug 10, 2014

5183 = 71 × 73 5183=71\times 73

Using Wilson's Theorem :

Wilson’s theorem: 70 ! 1 ( m o d 71 ) \displaystyle \color{royalblue}{\textbf{Wilson's theorem: }} \boxed{70!\equiv -1\pmod {71}}

Wilson’s theorem: 72 71 70 ! 1 ( m o d 73 ) \displaystyle \color{royalblue}{\textbf{Wilson's theorem: }} 72\cdot 71\cdot 70!\equiv -1\pmod {73}

( 1 ) ( 2 ) 70 ! 1 72 ( m o d 73 ) : 2 70 ! 36 ( m o d 73 ) \displaystyle \implies (-1)(-2)\cdot 70!\equiv -1\equiv 72\pmod {73}\stackrel{:2}{\implies} \boxed{70!\equiv 36\pmod {73}}

Using Extended Euclidean Algorithm we know that

{ 73 = 71 + 2 71 = 2 ( 35 ) + 1 \displaystyle \begin{cases}73=71+2\\ 71=2(35)+1\end{cases}

1 = 71 2 ( 35 ) = 71 ( 73 71 ) ( 35 ) = 71 ( 36 ) + 73 ( 35 ) \displaystyle \implies 1=71-2(35)=71-(73-71)(35)=71(36)+73(-35)

Or subtract consecutive equations:

73 = 73 ( 1 ) + 71 ( 0 ) 73=73(1)+71(0)

71 = 73 ( 0 ) + 71 ( 1 ) 71=73(0)+71(1)

2 = 73 ( 1 ) + 71 ( 1 ) 2=73(1)+71(-1)

1 = 73 ( 35 ) + 71 ( 36 ) 1=73(-35)+71(36)

See Chinese Remainder theorem (CRT).

answer 36 71 ( 36 ) + ( 1 ) 73 ( 35 ) 1277 ( m o d 5183 ) \color{royalblue}{\textbf{answer}}\equiv 36\cdot 71(36)+(-1)\cdot 73(-35)\equiv \boxed{1277}\pmod {5183}

Per the instructions, I didn't use a computational device. So I put a rock on my keyboard and got it wrong. You, kind sir, obviously used a "computational device". A set that includes pencil, paper, brain, etc.

Ken Hodson - 5 years, 6 months ago

wilson s theorem states that 70!=1(mod 71)

abhishek alva - 5 years ago

Log in to reply

No, Wilson's theorem says that ( p 1 ) ! 1 p 1 ( m o d p ) (p-1)!\equiv -1\equiv p-1\pmod{p} for all primes p p (here let p = 71 p=71 ).

mathh mathh - 4 years, 10 months ago

after wilson's theorem application, we can use Chinese remainder theorem!

Kartik Sharma - 6 years, 10 months ago

Log in to reply

well, this is actually what I did! I've added the letters 'CRT' to the solution to make it clear.

mathh mathh - 6 years, 10 months ago

Log in to reply

oh yes, sorry! I didn't see that!!

Kartik Sharma - 6 years, 10 months ago

i did it by dividing the 70! into 12 groups of multiplications, then applying recursive divisions to find 12 reminders, being the 12th reminder the solution i needed, took like 1 (or 2 ?) hour to think, and like 10 min to do with calculator and paper. No computer or theorems involved :D

Eliud Alejandro Maldonado Sanchez - 3 years, 5 months ago

How can we know that 5183 factors into 71*73?

Ben Lou - 3 years, 3 months ago

Log in to reply

Because of wilson's theorem a factorial n-1 where n is a prime 70+1 is 71 is prime so it was worth checking.

Otherwise could brute force find prime factorization of 5183 by checking divisibility by all primes from 2 through square root ~72 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71 And find the last one 71 is the smallest to successful divide 5183.

Bethany Waanders - 6 months, 2 weeks ago

Log in to reply

A potentially faster way to check is by realizing that 5184 is divisible by 3, 1728 * 3, which is divisible by 3 again, 576, which is a square number, giving us a prime factorization of 2^6 * 3^4. We can then use difference of squares to get (72 - 1)(72 + 1)

「Piemanray314」 Piemanray314 - 1 month, 2 weeks ago

Where does the 5183 come from?

Kermit Rose - 2 years, 4 months ago

Is there any efficient way to get 70! Congruent to 36 modulo 73? Please answer.it would take hours without it

Sayan Das - 4 years, 2 months ago

Log in to reply

By Wilson's theorem 72! is -1 mod 73, so 70! is (-1)(72^(-1))(71^(-1)) is (-1)((-1)^(-1))((-2)^(-1)) is (-1)(-1)(-2^(-1)) is -2^(-1) mod 73. I used modulo multiplicative inverses.

mathh mathh - 3 years, 7 months ago

See my answer again. I've edited it.

mathh mathh - 3 years, 7 months ago
Aditya Raut
Aug 8, 2014

Simply a python code that prints the answer

ans ans

Sorry for not following the note, but I am learning programming so added this one :P

I too used python :p ............... sorry Krishna Ar

Harsh Shrivastava - 6 years, 10 months ago

Log in to reply

Hey! @HARSH SHrivastava . DId u use it for this - problem- Bhaskara-2 perplexing years...also?

Krishna Ar - 6 years, 9 months ago

Log in to reply

Well no,but checked my answer using python @Krishna Ar .

Harsh Shrivastava - 6 years, 9 months ago

im im

@HARSH SHrivastava

Aditya Raut - 6 years, 10 months ago

Log in to reply

NIce pic & thanks,BTW how do ya put pictures in comments? @Aditya Raut

Harsh Shrivastava - 6 years, 9 months ago

Log in to reply

@Harsh Shrivastava Go to post image . org , then upload your picture.

They will give you links in the next page, of the pic. out of them , copy the "Direct link" .

Then on brilliant , (i think you know how we give links, we put name of link is [...] and then followed by the link in (....) ....

The same way, type anything in the boxed bracket and just give a " ! " sign before it.

For example, see this, I show you the code typed to get the image followed by it ...

![img](http://s12.postimg.org/mjvf3v671/f_orbitals.gif) \color{#69047E}{\text{![img](http://s12.postimg.org/mjvf3v671/f\_orbitals.gif)}}

This will give output

img img

@HARSH SHrivastava

Aditya Raut - 6 years, 9 months ago

Log in to reply

@Aditya Raut can u provide 3 d eqn for all the orbitals?

Ananya Aaniya - 4 years, 10 months ago

Log in to reply

@Ananya Aaniya If you are still alive and remember this question then let me say How far do you wanna go beyond the context of discussion??? :- _ )

Ariijit Dey - 2 years, 11 months ago

If you use the python shell you don’t need a print statement. Just type the expression and it prints it automatically.

Daniel Popp - 3 years, 4 months ago

Sorry. I have more serious problem then math.

Marijana Marinić-Kragić - 2 years, 12 months ago
Carlos Victor
Nov 9, 2015

70!=k.71+70 . We know that p((p-3)!-(p-1)/2) with p prime, or 70!=t.73+36 and so 70!=m.5183 + 1277.

Carsten Meyer
May 8, 2020

For simplicity, let r r be the unknown remainder and n = 5183 n=5183 . Let's sharpen our pencils and do this:

  1. Factor n < 7 5 2 n<75^2 : We only need to check the first 21 primes smaller than 75. The simple divisibility rules for 2; 3; 5; 11 all fail, so we begin with the largest primes in the list to get lucky and find n = 71 73 n=71\cdot 73

  2. We may use the Chinese Remainder Theorem, because gcd ( 71 , 73 ) = 1 \gcd(71,\:73)=1 : r 70 ! m o d n r 70 ! m o d 71 r 70 ! m o d 73 \begin{aligned} r&\equiv 70!\mod n&&&\Leftrightarrow &&&&\begin{aligned} r&\equiv 70!\mod 71\\[.25em] r&\equiv 70!\mod 73 \end{aligned} \end{aligned}

  3. For the first factorial, we use Wilson's Theorem directly. For the second factorial, we are missing the factors 71 ; 72 71;\:72 , so we need their inverses. We notice ( 72 ) 1 m o d 73 (-72)\equiv1 \mod 73 , and find 36 71 1 m o d 73 \red{36}\cdot 71\equiv 1\mod 73 using Euclid's Algorithm: k r k a k x k 2 73 1 71 0 2 1 36 1 1 35 35 2 0 2 1 1 = 36 71 35 73 70 ! 1 m o d 71 70 ! 70 ! ( 36 71 ) ( 72 ) 72 ! ( 36 ) ( 1 ) ( 36 ) 36 m o d 73 \begin{aligned} \begin{array}{r|r|r|r} k & r_k & a_k & x_k\\\hline -2 & 73 & & \\ -1 & 71 & & \\ 0 & 2 & 1 & \red{36} \\ 1 & 1 & 35 & -\blue{35} \\ 2 & \underline{\underline{0}} & 2 & 1 \end{array}&&&&\Rightarrow&&&& 1 &= \red{36}\cdot 71-\blue{35}\cdot 73&&&&&\left|\quad\begin{aligned} 70!&\equiv -1\mod 71\\[.25em] 70!&\equiv 70!\cdot (\red{36}\cdot 71)\cdot (-72)\equiv 72!\cdot(-36)\\ &\equiv (-1)\cdot (-36)\equiv 36\mod 73 \end{aligned}\right. \end{aligned}

  4. We combine our system of congruences to get a single general linear diophantine equation: r 1 m o d 71 r 36 m o d 73 r = 1 + 71 x r = 36 + 73 y } 37 = 71 x 73 y , x , y Z \begin{aligned} \begin{aligned} r&\equiv -1\mod 71\\[.25em] r&\equiv 36\mod 73 \end{aligned}&&&&\Leftrightarrow&&&&\left.\begin{aligned} r&= -1 + 71x\\[.25em] r&= 36 + 73y \end{aligned}\right\} && 37&=71x-73y, &&& x,\:y&\in\mathbb{Z} \end{aligned} With the result of Euclid's Algorithm earlier, we can directly write down all solutions. ( ) k k 18 (*)\:\:k\rightarrow k-18 keeps the result small: ( x y ) = ( 36 73 35 71 ) ( 37 k ) = ( ) ( 18 73 17 71 ) ( 1 k ) , k Z r = 1 + 71 x = 1277 + n k , k Z \begin{aligned} \begin{pmatrix}x\\y\end{pmatrix}&=\begin{pmatrix} \red{36}&73\\ \blue{35}& 71 \end{pmatrix}\begin{pmatrix}37\\k\end{pmatrix}\underset{(*)}{=}\begin{pmatrix} 18&73\\ 17& 71 \end{pmatrix}\begin{pmatrix}1\\k\end{pmatrix},& k&\in\mathbb{Z}&&&\Rightarrow &&&& r&=-1+71x=\boxed{1277}+nk,&k&\in\mathbb{Z} \end{aligned}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...