mersenneforum.org Question about these fascinating primes
 Register FAQ Search Today's Posts Mark Forums Read

2020-01-24, 06:49   #12
LaurV
Romulan Interpreter

Jun 2011
Thailand

2·3·1,471 Posts

Quote:
 Originally Posted by VBCurtis Using 2 + floor is equivalent to using 1 + ceiling, no?
Except for integers. (hint: subtract 1 from both sides...)

2020-01-24, 07:01   #13
LaurV
Romulan Interpreter

Jun 2011
Thailand

211728 Posts

Quote:
 Originally Posted by storm5510 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

2020-01-24, 08:01   #14
kar_bon

Mar 2006
Germany

2×3×52×19 Posts

Quote:
 Originally Posted by storm5510 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.

2020-01-24, 13:47   #15
Dr Sardonicus

Feb 2017
Nowhere

2·52·71 Posts

Quote:
 Originally Posted by Happy5214 "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.

2020-01-24, 14:50   #16
storm5510
Random Account

Aug 2009
U.S.A.

31048 Posts

Quote:
 Originally Posted by LaurV ...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

 2020-01-24, 17:27 #17 pinhodecarlos     "Carlos Pinho" Oct 2011 Milton Keynes, UK 2×5×11×43 Posts This interesting discussion should be moved to another thread.
2020-01-25, 11:55   #18
storm5510
Random Account

Aug 2009
U.S.A.

22×401 Posts

Quote:
 Originally Posted by pinhodecarlos 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!

 2020-01-26, 15:06 #19 storm5510 Random Account     Aug 2009 U.S.A. 22·401 Posts 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...
 2020-01-26, 18:13 #20 VBCurtis     "Curtis" Feb 2005 Riverside, CA 22·1,091 Posts 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.
2020-01-26, 20:10   #21
Batalov

"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

100011101000112 Posts

Quote:
 Originally Posted by storm5510 ...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!

 2020-01-27, 01:18 #22 storm5510 Random Account     Aug 2009 U.S.A. 22·401 Posts 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.

 Similar Threads Thread Thread Starter Forum Replies Last Post mart_r Prime Gap Searches 14 2020-06-30 12:42 enzocreti enzocreti 55 2019-04-27 11:10 tServo Hardware 7 2018-11-17 16:28 doctornash Other Mathematical Topics 7 2018-07-14 00:06 firejuggler Math 31 2014-01-08 18:28

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

Tue Oct 20 17:44:20 UTC 2020 up 40 days, 14:55, 1 user, load averages: 2.46, 2.55, 2.44