mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory > PARI/GP

Reply
 
Thread Tools
Old 2010-09-13, 14:01   #1431
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
with my extension method i got Aliquot(276) to 12601 in just over 11 seconds.
I don't think I believe that. If 276 is the first member, 396 is the second member, and 21374326697892540932 is the 100th member, what do you get for members 200, 300, 400, ..., 2000?

Last fiddled with by CRGreathouse on 2010-09-13 at 14:01
CRGreathouse is offline   Reply With Quote
Old 2010-09-13, 14:01   #1432
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

22×727 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
yep 100 * 127 -99 (lost to replacement) = (#v=12601) in 11 seconds.
Which value represent 12601?
The index of the sequence Aliquot(276), so 12601 iterations?

The first 100 iterations are here.

Last fiddled with by kar_bon on 2010-09-13 at 14:03
kar_bon is offline   Reply With Quote
Old 2010-09-13, 14:03   #1433
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Code:
 Aliquot(n)= v=vector(1,x,n);for(b=1,100,for(a=2,127,d=Alistep(v[a-1]);v=concat(v,d);if(d==n || d==1,break()));v[1]==v[#v]);print(v)
once you do the alistep put in try this for yourself i got:

*** last result computed in 11,437 ms.

and no I didn't use debug though I've played around and found it has 20 levels.
science_man_88 is offline   Reply With Quote
Old 2010-09-13, 14:08   #1434
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Code:
Alistep(n)=sigma(n)-n
Aliquot(n)=my(v=vector(1,x,n),d);for(b=1,100,for(a=2,127,d=Alistep(v[a-1]);v=concat(v,d);if(d==n || d==1,break()));v[1]==v[#v]);v

>Aliquot(10)
%3 = [10, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1]
So you're calculating something, but not the right thing.
CRGreathouse is offline   Reply With Quote
Old 2010-09-13, 14:15   #1435
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
Code:
Alistep(n)=sigma(n)-n
Aliquot(n)=my(v=vector(1,x,n),d);for(b=1,100,for(a=2,127,d=Alistep(v[a-1]);v=concat(v,d);if(d==n || d==1,break()));v[1]==v[#v]);v

>Aliquot(10)
%3 = [10, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1, 8, 7, 1]
So you're calculating something, but not the right thing.
it's because i forgot it's break(2) lol not break() that should be there.

never mind I see your point dang. but I think this still goes to 127 by the looks of it before repeating higher than the 100 list kar_bon gave me a link to.

Last fiddled with by science_man_88 on 2010-09-13 at 14:41
science_man_88 is offline   Reply With Quote
Old 2010-09-13, 15:11   #1436
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

838410 Posts
Default

if it did the math correct these are the next ones:

Code:
23780027782003162628, 27022045182026917372, 29800418252165873732, 30868734601205564812, 30868743536688997492, 31506186871079789708, 33685079263470335092, 37869561159553616108, 44810700265393440532, 52967010256293285740, 77368308005658962068, 77526798761623418732, 81730869595023949972, 81812211224085690348, 174495211883566827540, 383889841278567188460, 851420485964196743700, 2133148752623068133100, 4920463122717210500628, 9659030418601945179372, 19140499834691254267668, 31900833057818757113004, 60928733769254068230996, 101554467127566656249004, 169306878754562576009556, 282178131257604293349484
science_man_88 is offline   Reply With Quote
Old 2010-09-13, 15:16   #1437
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

never mind I didn't use my brain lol. how far would I have to go to find the 1 ot 276 ?
science_man_88 is offline   Reply With Quote
Old 2010-09-13, 15:18   #1438
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
never mind I didn't use my brain lol. how far would I have to go to find the 1 ot 276 ?
What do you want to find for each? The vector, the number of terms, the final prime, ...?

Last fiddled with by CRGreathouse on 2010-09-13 at 15:18
CRGreathouse is offline   Reply With Quote
Old 2010-09-13, 15:21   #1439
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

838410 Posts
Default

I want to figure the whole thing out Aliquot sequence n. but if I have to settle for it maybe when it repeats or is terminated.

Last fiddled with by science_man_88 on 2010-09-13 at 15:21
science_man_88 is offline   Reply With Quote
Old 2010-09-13, 15:28   #1440
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

597910 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
I want to figure the whole thing out Aliquot sequence n. but if I have to settle for it maybe when it repeats or is terminated.
You could just do
Code:
vector(274,n,Aliquot(n+1))
but you'll need to modify your program to look for loops, and you'll want some way to handle sequences that don't seem to terminate.

Last fiddled with by CRGreathouse on 2010-09-13 at 15:32
CRGreathouse is offline   Reply With Quote
Old 2010-09-13, 15:40   #1441
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
You could just do
Code:
vector(274,n,Aliquot(n+1))
but you'll need to modify your program to look for loops, and you'll want some way to handle sequences that don't seem to terminate.
that's what:

Code:
if(d==n || d==1,break(2))
is supposed to do. check for repeats of n or 1. but I guess we'll have to check for every integer in v to find out for sure. so the main part missing is a way to scan through v and check for repeating of a single item that isn't n.

Last fiddled with by science_man_88 on 2010-09-13 at 15:47 Reason: forgot the 2 that should be in there lol.
science_man_88 is offline   Reply With Quote
Reply



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

All times are UTC. The time now is 23:11.


Fri Aug 6 23:11:19 UTC 2021 up 14 days, 17:40, 1 user, load averages: 4.56, 4.22, 4.03

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.