mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2012-03-03, 02:43   #1
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

23·5·83 Posts
Default How to generate base10 representation of Mersenne-prime perfect numbers?

I found this site which has base10 representations of Mersenne-prime perfect numbers, but it's lacking the ones for M45-M47. How can I generate these?
Something that runs on Windows would be great, but if I do it with PARI I also have access to that on *nix.
James Heinrich is offline   Reply With Quote
Old 2012-03-03, 02:56   #2
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

100100101011002 Posts
Default

Pari
Code:
allocatemem(800000000)
P=37156667;  
write("perf45",2^(P-1)*(2^P-1))
 
P=42643801;
write("perf46",2^(P-1)*(2^P-1))
 
P=43112609;
write("perf47",2^(P-1)*(2^P-1))
 
# in *nix
fold < perf47 > perf47.txt
Batalov is offline   Reply With Quote
Old 2012-03-03, 08:58   #3
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

43·67 Posts
Default

With pfgw:

Code:
pfgw -od -q"2^43112608*(2^43112609-1)" >M47.txt
kar_bon is offline   Reply With Quote
Old 2012-03-03, 13:17   #4
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

23×5×83 Posts
Default

Quote:
Originally Posted by kar_bon View Post
With pfgw:
Code:
pfgw -od -q"2^43112608*(2^43112609-1)" >M47.txt
Perfect, thanks! Worked nicely.

I tried PARI, and failed. On *nix, all I could get was a Segmentation Fault. On Windows, it ran for 15 minutes and didn't seem to be doing anything so I aborted (by contrast, pfgw only took about 45 seconds).

Last fiddled with by James Heinrich on 2012-03-03 at 13:18
James Heinrich is offline   Reply With Quote
Old 2012-03-03, 13:28   #5
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
Perfect, thanks! Worked nicely.

I tried PARI, and failed. On *nix, all I could get was a Segmentation Fault. On Windows, it ran for 15 minutes and didn't seem to be doing anything so I aborted (by contrast, pfgw only took about 45 seconds).
I got a working script:

Code:
(09:26)>MeVec
%240 = [2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917]
(09:26)>for(x=1,#MeVec, print((2^(MeVec[x]-1))*(2^MeVec[x]-1)))
just change MeVec to include the exponents you want.
science_man_88 is offline   Reply With Quote
Old 2012-03-03, 20:11   #6
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

Maybe perhaps wait until we know whether or not we know M48?
Dubslow is offline   Reply With Quote
Old 2012-03-08, 00:20   #7
Xitami
 
Apr 2010

2×7 Posts
Default

http://bellard.org/mersenne.html
Xitami is offline   Reply With Quote
Old 2012-03-08, 02:42   #8
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

222318 Posts
Default

Quote:
Originally Posted by Xitami View Post
I love it! So, you are one of the IOCCC winners? Respect!
LaurV is offline   Reply With Quote
Old 2012-03-08, 06:45   #9
Xitami
 
Apr 2010

2×7 Posts
Smile

NO
Xitami is offline   Reply With Quote
Old 2012-03-08, 07:05   #10
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

33·347 Posts
Default

Quote:
Originally Posted by Xitami View Post
NO
Oh. Sorry. I don't know why I understood that is your web page the one you linked, maybe because of the first person speech there. Mea culpa. Anyhow, welcome to the forum.
LaurV is offline   Reply With Quote
Old 2012-03-08, 07:20   #11
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

Well what makes you think it's his website? Also, he's been here longer than I have.
Dubslow is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Right Perfect Prime Numbers Housemouse Math 34 2016-04-07 16:29
Have Found Principle to generate infinitive PRIME NUMBERS Evgeny Dolgov Miscellaneous Math 38 2010-09-05 17:45
Square numbers and binary representation ET_ Miscellaneous Math 40 2010-06-06 12:55
Effective way to generate prime numbers (infinitive) Evgeny Dolgov Math 1 2003-12-08 09:25
Search for Mersenne primes by checking for perfect numbers dsouza123 Miscellaneous Math 33 2003-09-02 16:18

All times are UTC. The time now is 16:50.

Mon Apr 12 16:50:25 UTC 2021 up 4 days, 11:31, 1 user, load averages: 1.42, 1.98, 2.06

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.