mersenneforum.org  

Go Back   mersenneforum.org > Other Stuff > Forum Feedback

Reply
 
Thread Tools
Old 2016-11-05, 23:26   #1
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

3·7·167 Posts
Default What's the algorithm for deciding in which base to express the post count?

Is it random? And what are all the possible bases for this particular algorithm? I mean the bases that are being used right now, not ones you could potentially add.

All the bases seem to be a power of 2, base 2, 4, 8, 16, 32, have I missed or forgotten some that don't fit this pattern?


edit: Oh yeah, also there's post counts where they factor the numbers. Maybe the ones in a weird base are all prime?

Last fiddled with by jasong on 2016-11-05 at 23:27
jasong is offline   Reply With Quote
Old 2016-11-05, 23:58   #2
Stargate38
 
Stargate38's Avatar
 
"Daniel Jackson"
May 2011
14285714285714285714

29716 Posts
Default

I think it depends on the subforum, or possibly even the thread number (i.e. this thread starts with 446485). It could also be a random seed-based algorithm.
Stargate38 is offline   Reply With Quote
Old 2016-11-06, 00:58   #3
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

25×257 Posts
Default

This code is really inelegant, but it works.
Code:
$zzz = $post[posts]; 
$xxx = $zzz; 
if ($xxx == 0) { 
    $zzz = rand(1, 10000); 
    $xxx = $zzz; 
} 
$tmp = ""; 
$choice = time(); 
if ($choice % 20 == 0) { 
    $listofradices = array("2", "8", "10", "16"); 
    shuffle($listofradices); 
    $radix = $listofradices[0]; 
    $tmp = strtoupper(base_convert($xxx, 10, $radix)) . "<SUB>" . $radix . "</SUB>"; 
} else { 
    if ($xxx == 1) { 
        $tmp = "1&times;"; 
    } 
    for ($iii = 2; $iii < $zzz; $iii++) { 
        $counter = 0; 
        while ($xxx % $iii == 0) { 
            $counter = $counter + 1; 
            $xxx = $xxx / $iii; 
        } 
        if ($counter > 1) { 
            $tmp = $tmp . number_format($iii) . "<SUP>" . $counter . "</SUP>" . "&times;"; 
        } else { 
            if ($counter == 1) { 
                $tmp = $tmp . number_format($iii) . "&times;"; 
            } 
        } 
    } 
    if ($xxx == $iii) { 
        $tmp = $tmp . number_format($xxx) . "&times;"; 
    } 
    $tmp = substr($tmp, 0, -7); 
}
Xyzzy is offline   Reply With Quote
Old 2016-11-06, 19:22   #4
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts
Default

Looks like 1 in 20 chance to get binary, octal, decimal, or hex post count, otherwise (19 out of 20) it's shown in factored form.
Dubslow is offline   Reply With Quote
Old 2016-11-07, 06:04   #5
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

22·1,549 Posts
Default

What about ...
Code:
for ($iii = 2; $iii * $iii <= $zzz; $iii++)
Fewer wasted clock cycles = more P95 clock cycles.

Last fiddled with by retina on 2016-11-07 at 06:06 Reason: Colouring
retina is online now   Reply With Quote
Old 2016-11-07, 10:58   #6
Antonio
 
Antonio's Avatar
 
"Antonio Key"
Sep 2011
UK

32·59 Posts
Default

Quote:
Originally Posted by retina View Post
What about ...
Code:
for ($iii = 2; $iii * $iii <= $zzz; $iii++)
Fewer wasted clock cycles = more P95 clock cycles.
Sorry - ignore me, just being stupid today

Or ...
Code:
    for ($iii = 2; $iii < $xxx; $iii++) {
and do away with the multiply.

Last fiddled with by Antonio on 2016-11-07 at 11:10 Reason: Me being a bit dumb!
Antonio is offline   Reply With Quote
Old 2016-11-07, 12:04   #7
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

22·1,549 Posts
Default

Quote:
Originally Posted by Antonio View Post
and do away with the multiply.
If $xxx is a prime then we get back the original algorithm.

ETA: But it could be this:
Code:
for ($iii = 2; $iii * $iii <= $xxx; $iii++)

Last fiddled with by retina on 2016-11-07 at 12:05
retina is online now   Reply With Quote
Old 2016-11-07, 13:04   #8
Antonio
 
Antonio's Avatar
 
"Antonio Key"
Sep 2011
UK

21316 Posts
Default

Quote:
Originally Posted by retina View Post
If $xxx is a prime then we get back the original algorithm.

ETA: But it could be this:
Code:
for ($iii = 2; $iii * $iii <= $xxx; $iii++)
But you also need to change ...
Code:
    if ($xxx == $iii) { 
        $tmp = $tmp . number_format($xxx) . "&times;"; 
    } 
to ...
Code:
    if ($xxx != 1) { 
        $tmp = $tmp . number_format($xxx) . "&times;"; 
    }
or it misses the final prime.
Antonio is offline   Reply With Quote
Old 2016-11-07, 13:17   #9
axn
 
axn's Avatar
 
Jun 2003

31·163 Posts
Default

Nothing new under the sun
axn is offline   Reply With Quote
Old 2016-11-08, 02:22   #10
Mark Rose
 
Mark Rose's Avatar
 
"/X\(‘-‘)/X\"
Jan 2013

22·733 Posts
Default

I'm still waiting for

Code:
if (!($xxx & $xxx + 1))
    $tmp = 'M' . log($xxx + 1, 2);
elseif ($choice % 20 == 0) { 
...
Mark Rose is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Increase your post count and save the rainforest The Carnivore Lounge 14 2018-01-27 18:11
PCI Express 3.0 ATH GPU Computing 2 2011-07-08 13:34
Need help deciding between Athlon II X4 620 and i5 garo Hardware 164 2010-01-30 18:59
Sierpinski/Riesel Base 5: Post Primes Here robert44444uk Sierpinski/Riesel Base 5 358 2008-12-08 16:28
Deciding squarefree numbers Jushi Math 4 2006-03-30 13:56

All times are UTC. The time now is 13:32.


Sat Jul 17 13:32:05 UTC 2021 up 50 days, 11:19, 1 user, load averages: 1.64, 1.56, 1.57

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.