![]() |
|
|
#2311 |
|
"Ed Hall"
Dec 2009
Adirondack Mtns
384010 Posts |
I've been searching for sociable numbers in the 10^15 area for a while now, using the following PARI script:
Code:
pS=readvec(pariStatus)
a=pS[1]
for(b=a,a+10^9,i=b;for(n=1,200,m=n;i=sigma(i)-i;if(i<b||i>b*20,break()));if(m>199,print(b);write("pariCyclesFound",b));if(b%10000==0,print(b, " ",gettime()/1000+0.," seconds/10000");extern("rm pariStatus");write("pariStatus",b)))
Code:
1000010274050000 Code:
... 1000010274060000 5.6430000000000000000000000000000000000 seconds/10000 1000010274063430 1000010274070000 5.5030000000000000000000000000000000000 seconds/10000 ... For a while I had nine machines set up to search 11*10^14, 12*10^14, ... 19*10^14, respectively. Each was set to start on power-up, so if the AC was lost, they would begin again, within a few numbers (seconds) of where they were interrupted. Occasionally, I would record their progress in case an interruption occurred at a time that caused pariStatus to be corrupted or lost. I'm sure this could be improved upon and it may even have some flaw(s) I've not considered. So, I'm open to all critique... |
|
|
|
|
|
#2312 | ||
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
Quote:
Last fiddled with by science_man_88 on 2011-10-26 at 21:46 |
||
|
|
|
|
|
#2313 |
|
"Ed Hall"
Dec 2009
Adirondack Mtns
28·3·5 Posts |
I'm not aware of any order 3 sociable numbers, but there are order 4, 5, 6, 8, 9 and 28, so I'd like my search to include at least that many levels.
|
|
|
|
|
|
#2314 |
|
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
|
|
|
|
|
|
#2315 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
Code:
for(x=3,1000000,b=x;for(y=1,100,if(sigma(b)-b!=0,b=sigma(b)-b);if(b==x,print(x","y);break()))) |
|
|
|
|
|
|
#2316 | |
|
"Ed Hall"
Dec 2009
Adirondack Mtns
28·3·5 Posts |
Quote:
I like your approach, but I need to get a better picture of the whole. I think there should be a break if sigma(b)-b falls below x. I'm going to need to add my tracking and check timing. Off to study, but maybe not too much tonight. Unfortunately, a preliminary trial with edits here didn't find the test cycle from the previous example... , but it ran faster ...Thanks... |
|
|
|
|
|
|
#2317 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
Code:
(09:00)>sigma(1000010274070000)-1000010274070000 %154 = 1421114600505088 (09:00)>sigma(%)-% %155 = 1415563371597376 (09:01)>sigma(%)-% %156 = 1515576001115456 (09:01)>sigma(%)-% %157 = 2075868183012544 (09:01)>sigma(%)-% %158 = 2096174602984256 (09:01)>sigma(%)-% %159 = 2063421874812754 (09:01)>sigma(%)-% %160 = 1043754255742634 (09:01)>sigma(%)-% %161 = 545264138006614 (09:01)>sigma(%)-% %162 = 336474062378666 (09:01)>sigma(%)-% %163 = 195012689531734 (09:01)>sigma(%)-% %164 = 97506344765870 (09:01)>sigma(%)-% %165 = 78039653764690 (09:01)>sigma(%)-% %166 = 67385070876590 (09:01)>sigma(%)-% %167 = 53908056701290 (09:01)>sigma(%)-% %168 = 56557293070742 (09:01)>sigma(%)-% %169 = 31204023763258 Last fiddled with by science_man_88 on 2011-10-27 at 12:05 |
|
|
|
|
|
|
#2318 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
in fact:
http://factordb.com/sequences.php?se...ll&fr=0&to=100 proves it's not a cycle. Code:
(10:15)>for(x=1000010274060000,1000010274060000,b=x;for(y=1,10000000,if((sigma(b)-b) != 0,b=sigma(b)-b);if(b==x || isprime(b),print(x","y);break()))) 1000010274060000,228 (10:15)>## *** last result computed in 1,235 ms. (10:15)>for(x=1000010274060000,1000010274060000,b=x;for(y=1,10000000,if((sigma(b)-b) != 0,b=sigma(b)-b);if(b==x,print(x","y);break()))) (10:22)>## *** last result computed in 12,859 ms. Last fiddled with by science_man_88 on 2011-10-27 at 13:56 |
|
|
|
|
|
#2319 |
|
"Ed Hall"
Dec 2009
Adirondack Mtns
28·3·5 Posts |
I think you have confused my checkpoint, 1000010274060000, with the amicable number, 1000010274063430.
![]() Code:
[85486] 45 Needham 2004 1000010274063430=2*7^2*5*31*53507*1230371 1161476072988602=2*7^2*17*251*571*727*6691 Code:
? sigma(1000010274063430)-1000010274063430 %1 = 1161476072988602 ? sigma(1161476072988602)-1161476072988602 %2 = 1000010274063430 ? The new code now works, but when I add in all the print stuff, it bogs down. Although a slight improvement, this new method does not result in a significant savings: Code:
for(b=1000010274050000,1000010274080000,i=b;for(n=1,100,i=sigma(i)-i;if(i<b||i>b*20,break());if(i==b,print(b);write("pariCyclesFound",b);break()));if(b%10000==0,print(b, " ",gettime()/1000+0.," seconds/10000");extern("rm pariStatus");write("pariStatus",b)))
Code:
... 1000010274060000 5.6750000000000000000000000000000000000 seconds/10000 1000010274063430 1000010274070000 5.4970000000000000000000000000000000000 seconds/10000 ... Code:
for(b=1000010274050000,1000010274080000,i=b;for(n=1,200,m=n;i=sigma(i)-i;if(i<b||i>b*20,break()));if(m>199,print(b);write("pariCyclesFound",b));if(b%10000==0,print(b, " ",gettime()/1000+0.," seconds/10000");extern("rm pariStatus");write("pariStatus",b)))
Code:
... 1000010274060000 5.6780000000000000000000000000000000000 seconds/10000 1000010274063430 1000010274070000 5.5030000000000000000000000000000000000 seconds/10000 ... Thanks everyone for the assistance... |
|
|
|
|
|
#2320 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
Code:
(10:29)>for(x=1000010274063430,1000010274063430,b=x;for(y=1,10000000,if((sigma(b)-b) != 0,b=sigma(b)-b);if(b==x,print(x","y);break()))) 1000010274063430,2 |
|
|
|
|
|
|
#2321 | |
|
Aug 2006
3·1,993 Posts |
Quote:
GP doesn't have much in the way of I/O. I suggest Code:
extern("rm oldStatus; mv pariStatus oldStatus");
write("pariStatus", ...);
extern("rm oldStatus");
|
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why do I sometimes see all the <> formatting commands when I quote or edit? | cheesehead | Forum Feedback | 3 | 2013-05-25 12:56 |
| Passing commands to PARI on Windows | James Heinrich | Software | 2 | 2012-05-13 19:19 |
| Ubiquity commands | Mini-Geek | Aliquot Sequences | 1 | 2009-09-22 19:33 |
| 64-bit Pari? | CRGreathouse | Software | 2 | 2009-03-13 04:22 |
| Are these commands correct? | jasong | Linux | 2 | 2007-10-18 23:40 |