mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > Riesel Prime Search

Reply
 
Thread Tools
Old 2020-01-24, 06:49   #12
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

8,543 Posts
Default

Quote:
Originally Posted by VBCurtis View Post
Using 2 + floor is equivalent to using 1 + ceiling, no?
Except for integers. (hint: subtract 1 from both sides...)
LaurV is offline   Reply With Quote
Old 2020-01-24, 07:01   #13
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

854310 Posts
Default

Quote:
Originally Posted by storm5510 View Post
Code:
231*2^2335281-1 is prime! 702992 digits.
4,544,874. So I must not be doing something properly.
Properties of logarithm function:

log(a*b)=log(a)+log(b)
log(a^b)=b*log(a)
logb(x)=logc(x)/logc(b) (change of base)
In your case, log10(231*2^2335281)=log10(231)+2335281*log10(2)~=2.3+2335281*0.3 = 2.3+702,989.6

Your confusion may be because log in your case is assumed to be any base (like natural log). If you take base 10, log10(10) is 1, so the last part is gone. Note that in windows calculator, log is base 10 (what we use in school to write like lg) and not base e (what we used in school to write like ln).

Last fiddled with by LaurV on 2020-01-24 at 07:02
LaurV is offline   Reply With Quote
Old 2020-01-24, 08:01   #14
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

24×52×7 Posts
Default

Quote:
Originally Posted by storm5510 View Post
Code:
10*2^13509-1 is 3-PRP! (0.0290s+0.0015s)
10*2^21737-1 is 3-PRP! (0.0676s+0.0011s)
10*2^25623-1 is 3-PRP! (0.0805s+0.0011s)
You should also use the normalized form instead:
10*2^n-1 = 5*2^(n+1)-1, see here for those primes.
kar_bon is offline   Reply With Quote
Old 2020-01-24, 13:47   #15
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

3,251 Posts
Default

Quote:
Originally Posted by Happy5214 View Post
"floor" (for positive numbers) just means to truncate the part after the decimal point. It really should be the ceiling (think of 100, which has 3 digits and a base-10 log of 2).

The multiplication by (log(2) / log(10)) converts the exponent (which is the base-2 log of the 2^n part) to the base-10 log. The first 2 (I think) was supposed to be the k value (10), which really should have been 1. Replace that with the base-10 log of whatever k is (e.g. log(231) / log(10) for your last example). The -1 at the end can basically be ignored.
Actually, I meant 2. Generally, the number of decimal digits in N is 1 + floor(log(N)/log(10)). If N = 10*2^13509 - 1, then (since N+1 is not a power of ten), N has the same number of decimal digits as N+1, so we may use 1 + floor(log(N+1)/log(10)). Now

log(N+1) = log(10) + 13509*log(2), so we have

1 + floor(log(N+1)/log(10)) = 2 + floor(13509*log(2)/log(10)), which is 4068.

Siccing the mighty Pari-GP on the previous query,

Code:
? 1+floor((log(231) + 233528*log(2))/log(10))

%2 = 70302
As a ballpark estimate, log(2)/log(10) is close to 0.3 (more closely, 0.30102999).

Also, I meant floor(), the integer floor. The integer ceiling of an exact integer is that integer, so it gives the wrong answer for exact powers of ten; ceil(log(100)/log(10)) is 2, not 3.
Dr Sardonicus is offline   Reply With Quote
Old 2020-01-24, 14:50   #16
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
U.S.A.

1,213 Posts
Default

Quote:
Originally Posted by LaurV View Post
...Your confusion may be because log in your case is assumed to be any base (like natural log). If you take base 10, log10(10) is 1, so the last part is gone. Note that in windows calculator, log is base 10 (what we use in school to write like lg) and not base e (what we used in school to write like ln).
I think you are probably correct. Perhaps Windows calculator is not doing this correctly. It has "log" and "ln." I have always taken the first to mean base 10, and the second, base 2. Either way, I cannot get it to come up with a correct value based on what I have seen here.

Quote:
Originally Posted by kar_bon
You should also use the normalized form instead:
10*2^n-1 = 5*2^(n+1)-1, see here for those primes.
I looked. All of this seems to be locked in on 5, or perhaps, multiples of 5.

Quote:
Originally Posted by Dr Sardonicus
Siccing the mighty Pari-GP on the previous query,
This must be an expression calculator. I found a few online but none could return a value of any size.

I looked at some of the prime results posted above. I noticed some of them use composite numbers, like 231*2^2335281-1. At first, I thought this would be self-defeating, but then, I remembered some basics: Odd number * odd number is an odd number. Just in case, I steered around this. Below is a PFGW ABC2 I had been experimenting with.

Code:
ABC2 $a*2^$b-1
a: primes from 100 to 500
b: from 4256191 to 4256191
The "b" number is a natural from a long list I created with a simple Perl script. Repeating it was the only way I could find to keep it static while being able to increment the "a." I was amazed at the different operator combinations I could use.

I want to thank all of you for your feedback so far. Most kind.

Last fiddled with by storm5510 on 2020-01-24 at 14:51 Reason: Typo
storm5510 is offline   Reply With Quote
Old 2020-01-24, 17:27   #17
pinhodecarlos
 
pinhodecarlos's Avatar
 
"Carlos Pinho"
Oct 2011
Milton Keynes, UK

3·1,523 Posts
Default

This interesting discussion should be moved to another thread.
pinhodecarlos is offline   Reply With Quote
Old 2020-01-25, 11:55   #18
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
U.S.A.

1,213 Posts
Default

Quote:
Originally Posted by pinhodecarlos View Post
This interesting discussion should be moved to another thread.
Probably...

1+floor((log(231) + 233528*log(2))/log(10))
1+floor((log(231) + 233528*0.3010299
1+2.3636119 + 233528*0.3010299
1+70301
70302

It works!

Now, back on-topic please.
storm5510 is offline   Reply With Quote
Old 2020-01-26, 15:06   #19
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
U.S.A.

121310 Posts
Default

I have been looking at these pages for several days and all the results I see are in the form of x*2p-1. Yes, this is an expansion of the standard Mersenne format. Why not be more creative? Dr. NIcely's web site is a good example. I have tested other combinations with PFGW and they all run fine. Naturally, if the goal here is to keep everything in the Mersenne purview, then I understand. Just writing out-loud...
storm5510 is offline   Reply With Quote
Old 2020-01-26, 18:13   #20
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

418710 Posts
Default

This project specifically is to search for k * 2^n-1. So, it should not surprise you that all these primes are of that form. Anyone could surely broaden their search to other forms, and there are many other projects to tackle those other types; this one only tests and coordinates this one form.

We use LLR to test for primality, as it is much faster than PFGW for these forms.
VBCurtis is online now   Reply With Quote
Old 2020-01-26, 20:10   #21
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(3,3^1118781+1)/3

234416 Posts
Default

Quote:
Originally Posted by storm5510 View Post
...I see are in the form of x*2p-1. Yes, this is an expansion of the standard Mersenne format. Why not be more creative?
Because when you add coefficient (your 'x'), the requirement for 'p' to be prime goes out of the window. 'p' can be any number. Easily can be an even number. just have a closer look at the UTM lists.

So don't use 'p' notation, and then you just fall through into the Riesel primes. Congrats for rediscovering them!
Batalov is offline   Reply With Quote
Old 2020-01-27, 01:18   #22
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
U.S.A.

1,213 Posts
Default

After some thought, I think I can explain what I was getting at. Consider the following:

Code:
2^50-1 = 1,125,899,906,842,623‬
2^51-1 = 2,251,799,813,685,247‬
There is a lot of open space between. The larger they are, the more space there is. These are just minuscule to what many typically run. My line of thinking is to be able to go deep between and still maintain the form. Something like this:

Code:
? * (2^1951871-1) - (2^366497)
If would take a massive coefficient to equate and allow the second exponentiation to drop off. I do not know if any of the current software forms could do it.

If my thinking seems sort of loony, please forgive me. I have had the flu for a week and, at times, the fever which goes with it.
storm5510 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Patterns in primes that are primitive roots / Gaps in full-reptend primes mart_r Prime Gap Searches 11 2020-06-01 22:37
A question about primes of a particular form enzocreti enzocreti 55 2019-04-27 11:10
Fascinating Lenovo memory configuration paper tServo Hardware 7 2018-11-17 16:28
Fascinating periodic sequence pairs doctornash Other Mathematical Topics 7 2018-07-14 00:06
question about a chain of primes firejuggler Math 31 2014-01-08 18:28

All times are UTC. The time now is 17:26.

Tue Jun 2 17:26:14 UTC 2020 up 69 days, 14:59, 3 users, load averages: 1.79, 1.69, 1.74

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.