![]() |
|
|
#1409 |
|
Aug 2006
3×1,993 Posts |
|
|
|
|
|
|
#1410 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
[8,7,1] ?
Last fiddled with by science_man_88 on 2010-09-12 at 15:20 Reason: think I got the sequence wrong |
|
|
|
|
|
#1411 |
|
Mar 2006
Germany
22×727 Posts |
Aliquot Sequence:
Example sequence: s0= N s1 = So for N=10 you get: 10 = 10+ 5 + 2 + 1 = 18 -> 18-10 = 8 8 = 8 + 4 + 2 + 1 = 15 -> 15-8 = 7 7 = 7 + 1 = 8 -> 8-7 = 1 STOP Ses also the thread here and the first open sequence (without ending found yet) here and my summary pages (Menu Aliquot Seqs.) here (not yet fully updated). |
|
|
|
|
|
#1412 |
|
Aug 2006
3·1,993 Posts |
kar_bon, I understand what an aliquot sequence is, but that doesn't tell me what sm88 wants.
I take it from his last post that he wants a vector with last term 1 and first term the input, where v[i+1] = sigma(v[i]) - v[i]. But of course it's not even proven that such a vector exists for all n...! |
|
|
|
|
|
#1413 |
|
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
basically I wanted to try and find all of the aliquot sequences but I made code that no matter what and I may have an earlier code than this but no matter what I get an error for all but perfect numbers.
|
|
|
|
|
|
#1414 |
|
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
Code:
%68 = (n)->v=vector(1,x,n);for(a=2,10,d=sumdiv(v[a-1],X,X=X)-v[a=1];v=concat(v,d)) (13:51) gp > Aliquot(4) *** user interrupt after 27,032 ms. *** bug in PARI/GP (Segmentation Fault), please report |
|
|
|
|
|
#1415 |
|
Aug 2006
597910 Posts |
It may be worth pointing out that the aliquot function is calculated in Pari as
sigma(n)-n and so essentially all of your program will be doing 'the rest', whatever that is. |
|
|
|
|
|
#1416 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
|
|
|
|
|
|
#1417 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
got it working now but I get a error of:
Code:
*** sigma: couldn't find a suitable name for a tempdir (MPQS). Code:
Alistep(n)=sigma(n)-n Code:
Aliquot(n)= v=vector(1,x,n);for(a=2,1000,d=Alistep(v[a-1]);v=concat(v,d);if(d==n || d==1,break()));print(v) Code:
for(n=2,1000,Aliquot(n)) |
|
|
|
|
|
#1418 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
I'm an idiot the error I was getting was because 276 never ends i think lol or at least in my memory.
|
|
|
|
|
|
#1419 | |
|
Aug 2006
3·1,993 Posts |
Quote:
default(debug,4) |
|
|
|
|
![]() |
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 |