mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2020-09-15, 15:50   #12
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

1101110011112 Posts
Default

Code:
Mod(10,107)^100000000000000000000000000000000000000000
Mod(34, 107)

##
  ***   last result computed in 0 ms
.

It actually works by left-right binary exponentiation modulo n

And since 107 is prime we can use Fermat's little theorem:

Code:
Mod(10,107)^(100000000000000000000000000000000000000000%106)
Mod(34, 107)
Or something even "bigger":

Code:
Mod(10,107)^(100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000%106)
Mod(4, 107)

Last fiddled with by paulunderwood on 2020-09-15 at 16:06
paulunderwood is offline   Reply With Quote
Old 2020-09-15, 16:06   #13
drmurat
 
"murat"
May 2020
turkey

22×19 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
Code:
Mod(10,107)^100000000000000000000000000000000000000000
Mod(34, 107)

##
  ***   last result computed in 0 ms
.

It actually works by left-right binary exponentiation modulo n

And since 107 is prime we can use Fermat's little theorem:

Code:
Mod(10,107)^(100000000000000000000000000000000000000000%106)
Mod(34, 107)
Or simething even "bigger":

Code:
Mod(10,107)^(100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000%106)
Mod(4, 107)

Thanks
drmurat is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
(M48) NEW MERSENNE PRIME! LARGEST PRIME NUMBER DISCOVERED! dabaichi News 571 2020-10-26 11:02
My Prime Number Bixodomt Miscellaneous Math 19 2019-08-06 00:23
Number of distinct prime factors of a Double Mersenne number aketilander Operazione Doppi Mersennes 1 2012-11-09 21:16
Estimating the number of prime factors a number has henryzz Math 7 2012-05-23 01:13
When do I know if the number is prime? uniqueidlondon Software 1 2003-05-17 16:57

All times are UTC. The time now is 15:40.

Thu Jan 28 15:40:13 UTC 2021 up 56 days, 11:51, 0 users, load averages: 4.71, 4.47, 4.01

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.