Thread: Aliquot genealogy project View Single Post
2012-01-01, 21:49   #40
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

202618 Posts

Quote:
 Originally Posted by science_man_88 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