mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2005-08-28, 22:18   #1
Primeinator
 
Primeinator's Avatar
 
"Kyle"
Feb 2005
Somewhere near M50..sshh!

11011111102 Posts
Default Shortcuts on large computations

Alright, quick question everyone. Is there a way to find the last few digits and the first few digits of a large number in exponent form, i.e. 2^2345343? I know that finding the last few digits would be easier, but finding more than the last 3 (as far as my mathematical knowledge goes, would take a very long time). And as for finding the first, say, 10 digits of the number...I have no idea how to do that. Is there an easy, fast way to find the first and last 10 digits of such a number, with any base?
Thanks.
Primeinator is offline   Reply With Quote
Old 2005-08-28, 22:26   #2
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

22·5·373 Posts
Talking

Quote:
Originally Posted by Primeinator
Alright, quick question everyone. Is there a way to find the last few digits and the first few digits of a large number in exponent form, i.e. 2^2345343? I know that finding the last few digits would be easier, but finding more than the last 3 (as far as my mathematical knowledge goes, would take a very long time). And as for finding the first, say, 10 digits of the number...I have no idea how to do that. Is there an easy, fast way to find the first and last 10 digits of such a number, with any base?
Thanks.
Finding the last k digits is easy, but requires knowing some elementary
number theory. Just compute your number mod 10^k for your chosen k.

Finding the first few digits is also easy and requires nothing more than
second year high school algebra. Hint: "think logarithms". Of course, one
needed to compute the log to sufficient accuracy, but that is easy.
[but it does require some knowledge of infinite series or equivalent]
R.D. Silverman is offline   Reply With Quote
Old 2005-08-29, 20:19   #3
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
Rep├║blica de California

2·13·443 Posts
Default

For the least-significant D decimal digits, compute your desired number using modular binary exponentiation, with modulus 10^D.
ewmayer is offline   Reply With Quote
Old 2005-09-03, 18:56   #4
Primeinator
 
Primeinator's Avatar
 
"Kyle"
Feb 2005
Somewhere near M50..sshh!

11011111102 Posts
Default

Thanks :)
Primeinator is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
What should the "q" value increase to for GNFS/SNFS computations? 2147483647 Factoring 2 2016-12-10 08:42
Large FFT tweaking Zerowalker Information & Answers 8 2013-04-19 15:01
a^n mod m (with large n) Romulas Math 3 2010-05-08 20:11
NFS with 5 and 6 large primes jasonp Factoring 4 2007-12-04 18:32
very large exponents pacionet Data 4 2005-11-04 20:10

All times are UTC. The time now is 04:25.

Wed Sep 23 04:25:48 UTC 2020 up 13 days, 1:36, 0 users, load averages: 2.48, 2.79, 2.55

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.