[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Modular arithmetic

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 14
Thread images: 2

File: mod.png (77KB, 1227x594px) Image search: [Google]
mod.png
77KB, 1227x594px
Anons how to solve this without wolphram

4^99 mod 375
>>
>>7653514
>who is Euler
>Legendre
>Jacobi
>fermats little theorem

just off the top of my head from number theory
>>
>>7653514
matlab
>>
I thought that Euler can't help. phi(375) = 200
4^200 mod 375 = 1 ;p
>>
>>7653538
>fermats little theorem
[math] a^{p} \equiv a ~~ \text{mod}(p) [/math] for prime p.

>99
>Prime
>>
>>7653562
you need the generalization of fermat's little theorem called euler's theorem, then its easy
>>
>>7653920
or alternatively use chinese remainder theorem first so that you can use fermat's little theorem later

also>>7653562 you clearly don't understand the use of the theorem
>>
CRT and Euler.

[math]375 = 3*5^3[/math], so first we solve mod 3 and then mod 125. Looking mod 3 it's obvious [math] 4^{99} = 1 mod 3[/math]. Now we have [math]\phi(125) = 25*(5-1) = 100[/math], so [math]4^{100} = 1 mod 5^3[/math] implies [math]4^{99} = 4^{-1} mod 5^3[/math] which is easier to compute. We have [math]4^{-1} = 94 mod 5^3[/math] just by using 4*94 = 1 + 3*125 (I found it by just looking at 1 + k*125 until I found a multiple of 4, but there are more algorithmic methods).

So we patch together [math] x = 1 mod 3[/math] and [math]x = 94 mod 125[/math]. But 94 is already 1 mod 3, so we get [math]x = 94 mod 375[/math] as a final result, and it is unique mod 375 by CRT again.
>>
>>7653973
Oh come on, CRT and Euler combined are overkill, with Euler alone you get 4^99=2^198=2^-2=4^-1 mod 375
>>
>>7653514
We know that ((a mod n)(b mod n)) mod n = ab mod n. We also know that rules for exponents in modular arithmetic are the same as the "normal" rules we already know, in particular, 4^(99)=(4^9)(4^(90)) etc.

This should be enough to get you started.
>>
>>7653514
The technique is called successive squaring. It's pretty cool and worth a look.
>>
>>7653514
so this is one way I did it by simplifying the exponent
4^99 mod 375
>I first simplified the exponent into small numbers for easier to work with answers
99=5*18 + 9
4^99=(4^5)^18 * 4^9
>I then broke the equation down to easier numbers
4^99 mod 375 =
((4^5 mod 375)^18 * (4^9 mod 375)) mod 375

4^5 mod 375 = 274, 4^9 mod 375 = 19
>now I just simplifies until I got to a smaller number
(274^18) * 19) mod 375
((274^3)^6 * 19) mod 375
(20570824^5 * 390845656) mod 375
((20570824 mod 375)^5 * (390845656 mod 375)) mod 375
(199^5 * 31) mod 375
94

this should help but i'm tired so there probably is a better way that I can't think of right now
>>
File: 7c6.png (11KB, 211x246px) Image search: [Google]
7c6.png
11KB, 211x246px
Just use Yooler's tierem
>>
>>7653514
Put into base 374
Add the individual numbers till you have a single digit number (still base 374 here)
Convert said number back to base 10
QED
Thread posts: 14
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.