mersenneforum.org  

Go Back   mersenneforum.org > Other Stuff > Forum Feedback

Reply
 
Thread Tools
Old 2017-04-02, 01:31   #100
Jayder
 
Jayder's Avatar
 
Dec 2012

11616 Posts
Default

Thank you very much Xyzzy! I do appreciate it. I had in mind something similar to a1call's suggestion, but if this is all that you can reasonably do with the forum software, I am grateful.

Quote:
Originally Posted by science_man_88 View Post
there are times one might refer to a value that's a mersenne prime as the exponent as well like in double mersennes ( aka operazione doppi mersennes) there's a lot to factor in does spacing count etc. example is M48 could be the 48th mersenne prime or the 48th mersenne number # is often used to separate them I think but it's an important note. and in some forums like astronomy there's M48 (for messier object 48) to think about.
I would guess that discussion of Mersenne numbers with an exponent less than 100 would be incredibly rare. If links were to be automatically added, I would recommend that it not link for anything less than 100, or perhaps 1000. I also previously suggested that it only place a link where there is a prime number, which would eliminate M48, as well as M8388608. I think that it would only take a little work to eliminate the vast majority of these issues.

I would also hope that (were this ever to be implemented) this could be disabled or enabled in a post, just as smilies and parsing of links can be enabled or disabled under Miscellaneous Options. I would even encourage this to be turned off by default.
Jayder is offline   Reply With Quote
Old 2017-04-02, 02:58   #101
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

1,931 Posts
Default

Quote:
Originally Posted by Jayder View Post
Thank you very much Xyzzy! I do appreciate it. I had in mind something similar to a1call's suggestion, but if this is all that you can reasonably do with the forum software, I am grateful.


I would guess that discussion of Mersenne numbers with an exponent less than 100 would be incredibly rare. If links were to be automatically added, I would recommend that it not link for anything less than 100, or perhaps 1000. I also previously suggested that it only place a link where there is a prime number, which would eliminate M48, as well as M8388608. I think that it would only take a little work to eliminate the vast majority of these issues.

I would also hope that (were this ever to be implemented) this could be disabled or enabled in a post, just as smilies and parsing of links can be enabled or disabled under Miscellaneous Options. I would even encourage this to be turned off by default.
Matching primes would not be very straightforward. The only way I can think of would be to make a long string of all the primes to be matched, separated by a non numeric separator and running a match.

Wikipedia article on Regular-Expressions:

https://en.wikipedia.org/wiki/Regular_expression
a1call is online now   Reply With Quote
Old 2017-04-02, 07:01   #102
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

1,931 Posts
Default

Copy the code:

Code:
<!DOCTYPE html>

<html>

<body>

​

<p>Replace "microsoft" with "W3Schools" in the paragraph below:</p>

​

<button onclick="myFunction()">Try it</button>

​

<p id="demo">exponent   Bad Good    Unk Sus Solo    Mis worktodo

50248349    1   0   1   0   1   0   DoubleCheck=50248349,73,1

50956921    0   0   4   0   4   0   DoubleCheck=50956921,73,1

52479409    0   0   3   0   3   0   DoubleCheck=52479409,73,1

53167397    0   0   4   0   4   0   DoubleCheck=53167397,73,1

53312419    0   0   4   0   4   0   DoubleCheck=53312419,73,1

53576399    0   0   3   0   3   0   DoubleCheck=53576399,73,1

53902309    0   0   2   0   2   0   DoubleCheck=53902309,73,1</p>

​

<script>

function myFunction() {

    var str = document.getElementById("demo").innerHTML; 

    var txt = str.replace(/(DoubleCheck=)([0-9]{3,})(,)/g,"$1<a href=https://www.mersenne.org/report_exponent/?exp_lo=+$2"+"&full=1>$2</a>$3");

    document.getElementById("demo").innerHTML = txt;

}

</script>

​

</body>

</html>

​

Paste and replace the left frame here:

https://www.w3schools.com/js/tryit.a...replace_regexp

Then click "Run"
Then click "Try it"
a1call is online now   Reply With Quote
Old 2017-04-02, 08:46   #103
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

1,931 Posts
Default

Now that I think about it, you could run a primality test on the matched exponent and only insert the link if true.
a1call is online now   Reply With Quote
Old 2017-04-02, 21:13   #104
Jayder
 
Jayder's Avatar
 
Dec 2012

2·139 Posts
Default

Quote:
Originally Posted by a1call View Post
Now that I think about it, you could run a primality test on the matched exponent and only insert the link if true.
Right, it would take next to no time. But an upper bound would need to be fixed, the obvious answer being the current PrimeNet limit of 999,999,999.

Last fiddled with by Jayder on 2017-04-02 at 21:14
Jayder is offline   Reply With Quote
Old 2017-04-02, 22:20   #105
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

1,931 Posts
Default

Yes, the previous prime is 999,999,9673 and can be instantly checked at:
https://www.mathsisfun.com/prime_numbers.html
a1call is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Collaboration Requests robert44444uk Prime Gap Searches 2 2017-01-17 07:57
Requests for change... WraithX FactorDB 32 2014-12-18 03:40
Manual Requests tului GPU Computing 15 2014-06-24 06:22
a few simple requests for v5 ixfd64 PrimeNet 44 2010-01-11 20:21
New Year requests masser Sierpinski/Riesel Base 5 22 2007-09-24 21:05

All times are UTC. The time now is 05:34.

Fri Oct 30 05:34:18 UTC 2020 up 50 days, 2:45, 1 user, load averages: 2.28, 1.96, 1.83

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.