[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Modular arithmetic
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /sci/ - Science & Math

Thread replies: 14
Thread images: 2
File: mod.png (77 KB, 1227x594) Image search: [Google]
mod.png
77 KB, 1227x594
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 (11 KB, 211x246) Image search: [Google]
7c6.png
11 KB, 211x246
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 replies: 14
Thread images: 2

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.