mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Aliquot Sequences

Reply
 
Thread Tools
Old 2012-01-01, 19:28   #34
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

22×1,433 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
if I read it correct I see multiple errors concerning 341:



Code:
(15:02)>sigma(1001)-1001
%22 = 343

Code:
(15:02)>sigma(341)-341
%23 = 43
Code:
(15:02)>sigma(341)-341
%23 = 43
I noticed. I just thought it would take longer for me to write all the errors than him to see and correct them :) You managed to write them quite easily and concisely.
henryzz is offline   Reply With Quote
Old 2012-01-01, 19:47   #35
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts
Default

Quote:
Originally Posted by henryzz View Post
I noticed. I just thought it would take longer for me to write all the errors than him to see and correct them :) You managed to write them quite easily and concisely.
I think I have a way making three loops ( some with multiple loops) that could get a similar looking file , I'll try it out.
science_man_88 is offline   Reply With Quote
Old 2012-01-01, 19:53   #36
firejuggler
 
firejuggler's Avatar
 
Apr 2010
Over the rainbow

2·1,217 Posts
Default

Noted and corrected. ATM, I'm implenting merge found on http://www.rieselprime.de/
And check the "end in 43", I may have made mistake there, as I entered all the data manually.
*looking for the correct " grammar" to make an inverted arrow,specifically for merge*

Last fiddled with by firejuggler on 2012-01-01 at 20:02
firejuggler is offline   Reply With Quote
Old 2012-01-01, 20:27   #37
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
I think I have a way making three loops ( some with multiple loops) that could get a similar looking file , I'll try it out.
Code:
aliquotfile(w,s)=print("digraph G {");forprime(z=w,s,print("\""z"p\"""[shape=plaintext];"));print();forprime(y=w,s,print(ali(y)"[shape=plaintext];"))
is the closest I could get to work.


Code:
aliquotfile(w,s)=print("digraph G {");forprime(z=w,s,print("\""z"p\"""[shape=plaintext];"));print();forprime(y=w,s,for(x=1,#ali5(y),print(ali(y)[x]"[shape=plaintext];")))
gave me a negative amount of components in vector error
science_man_88 is offline   Reply With Quote
Old 2012-01-01, 20:34   #38
wolfcrey
 
wolfcrey's Avatar
 
Jul 2009
Aachen, Germany

1010012 Posts
Default graphs and genealogy

In past years (20 years ago) I painted the genealogy graphs of all numbers up to 3000 by hand. I put an example on my website. Maybe this will help.
Wolfgang
wolfcrey is offline   Reply With Quote
Old 2012-01-01, 21:18   #39
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
Code:
aliquotfile(w,s)=print("digraph G {");forprime(z=w,s,print("\""z"p\"""[shape=plaintext];"));print();forprime(y=w,s,print(ali(y)"[shape=plaintext];"))
is the closest I could get to work.


Code:
aliquotfile(w,s)=print("digraph G {");forprime(z=w,s,print("\""z"p\"""[shape=plaintext];"));print();forprime(y=w,s,for(x=1,#ali5(y),print(ali(y)[x]"[shape=plaintext];")))
gave me a negative amount of components in vector error
got one that skips some more than it's supposed to:

Code:
(w,s)->print("digraph G {");forprime(z=w,s,print("\""z"p\"""[shape=plaintext];"));print();forprime(y=w,s,if(#ali(y)>0,for(x=1,#ali5(y),print(ali(y)[x]"[shape=plaintext];"))));print("}")
science_man_88 is offline   Reply With Quote
Old 2012-01-01, 21:49   #40
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
got one that skips some more than it's supposed to:

Code:
(w,s)->print("digraph G {");forprime(z=w,s,print("\""z"p\"""[shape=plaintext];"));print();forprime(y=w,s,if(#ali(y)>0,for(x=1,#ali5(y),print(ali(y)[x]"[shape=plaintext];"))));print("}")
this work ? :

Code:
(w,s)->print("digraph G {");forprime(z=w,s,print("\""z"p\"""[shape=plaintext];"));print();forprime(y=w,s,if(#ali(y)>0,for(x=1,#ali(y),print(ali(y)[x]"[shape=plaintext];"))));aligen40(w,s);print("}")
went back to ali because ali5 although it worked on it's own never seemed to work in the code for me.
Code:
ali(n)=a=n-1;b=[];for(x=0,floor(.5*a),if(x==0,if(sigma(a^2)-a^2==n,b=concat(b,a^2)),if(sigma((x)*(a-x))-((x)*(a-x))==n,b=concat(b,(x)*(a-x)))));b=vecsort(b,,8)
Code:
aligen40(w,s)=for(z=w,s,print("\n //ends in "z);for(x=1,#ali(z),for(y=1,#ali(ali(z)[x]),print(ali(ali(z)[x])[y]"->"ali(z)[x]))))

Last fiddled with by science_man_88 on 2012-01-01 at 21:58
science_man_88 is offline   Reply With Quote
Old 2012-01-02, 02:07   #41
firejuggler
 
firejuggler's Avatar
 
Apr 2010
Over the rainbow

2×1,217 Posts
Default

An update, before I go to sleep
This is becoming intricate.
so... merge included,various update.
At the ending of some terminating sequence, the iteration sometimes get to 6 digits ,then back to 7, before returning to 6. I have included only the 6 digits sequence.
X[shape=triangle]; for the lowest merge
X[shape=box];the value where it merge

Would you detect any error, please say so,it is all done manually.
Attached Files
File Type: txt graph1.txt (25.3 KB, 122 views)

Last fiddled with by firejuggler on 2012-01-02 at 02:12 Reason: precision, info, etc
firejuggler is offline   Reply With Quote
Old 2012-01-02, 02:10   #42
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts
Default

Quote:
Originally Posted by firejuggler View Post
An update, before I go to sleep
This is becoming intricate.
so... merge included,various update
X[shape=triangle]; for the lowest merge
X[shape=box];the value where it merge
I had a hard enough time coming close last time lol.
science_man_88 is offline   Reply With Quote
Old 2012-01-02, 02:48   #43
firejuggler
 
firejuggler's Avatar
 
Apr 2010
Over the rainbow

2·1,217 Posts
Default

pseudo-code

Code:
create file graph1.txt;
write file "digraph G {";
for i=3 to 100000 do
          if isprime(i)==true then
         write ""+i+p"[shape=plaintext];"+carriage return
     else
         write i+"[shape=plaintext];"+carriage return
         alseq=i
         do
            sigval=sigma(i)
           if sigma(i)=i then
                      alseq=i+"->"+i
                      write i+"[shape=circle];"
                      write alseq
                      exit do
           end
         if sigma(i)<i then
          if MOD(sigma(i),2)==0
             
           if sigval<1000000 then
                if isprime(sigval)==false then
                  alseq=alseq+"->"+sigval
                      if findstring(alseq,sigval(i))=true then
                                 write alseq
                                 exit do
                      end
                else
                   alseq=alseq+"->""+sigval+"p""
                   write alseq
                      exit do
                end
           else
                    write alseq
                    exit do
           end  
           until isprime(sigma(i))==true 
i=i++
end
write "}"
close file

Last fiddled with by firejuggler on 2012-01-02 at 03:48
firejuggler is offline   Reply With Quote
Old 2012-01-02, 04:04   #44
firejuggler
 
firejuggler's Avatar
 
Apr 2010
Over the rainbow

46028 Posts
Default

Code:
create file graph1.txt;
write file "digraph G {";
for i=1000000 to 3,i-- do
     if isprime(i)==true then
         write ""+i+p"[shape=plaintext];"
     else
         write i+"[shape=plaintext];"
         alseq=i

         do
            sigval=sigma(i)-i
            if sigval=i then
               alseq=i+"->"+i
               write i+"[shape=circle];"
               write alseq
               exit do
           end
                  
           if sigval<1000000 then               
              if sigma(i)<i then
                 if MOD(sigval,2)==0  then write sigma(i)+[shape=triangle] end end
              alseq=alseq+"->"+sigval
              if findstring(alseq,sigval)==true then
                 write i+"[shape=circle];"
                 write sigval+"[shape=circle]"
                 write alseq
                 exit do
              end
               
              if findstring(file,sigval)==true then
                 write alseq
                 exit do
                                 
                  
                     
             end
           
            
             sigval=sigma(sigval)-i
           until isprime(sigval)==true 
           write alseq
end
write "}"
close file
now it does take care of the basic merge, amicable, cycle...
better now still haven't "implemented" boxes

Last fiddled with by firejuggler on 2012-01-02 at 04:26
firejuggler is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
aliquot escape firejuggler Aliquot Sequences 26 2012-01-19 08:15
Special project #3b - Project 400 schickel Aliquot Sequences 307 2011-10-28 01:29
New σ for Aliquot JohnFullspeed Aliquot Sequences 18 2011-08-20 21:11
Special project #3a - Project 300 schickel Aliquot Sequences 29 2011-08-12 17:45
serious bug in aliquot.ub Andi47 Aliquot Sequences 3 2009-03-08 10:18

All times are UTC. The time now is 01:24.

Tue Oct 27 01:24:00 UTC 2020 up 46 days, 22:34, 0 users, load averages: 1.90, 1.97, 1.81

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.