View Single Post
Old 2012-01-06, 20:19   #60
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

2·3·52·19 Posts
Default

Quote:
Originally Posted by firejuggler View Post
now the hard part, to detect "merge".
boxes should happen what at least 2 arrow point to a number
and triangle should (that will probably hard and need a third loop) happen when the lowest even number leading to that merge

Code:
102->114
114->126
126->186
174->186
186[shape=box];
102[shape=triangle];
The first hard part is implemented:
- detect merges and ouput those nodes as box
- also perfect numbers and amicable pairs are solved: shown as circle

Included the updated source and the graph-file up to n=2000.

The harder part with lowest value for a merge is still missing yet.
Attached Files
File Type: zip lua_ali.zip (11.1 KB, 59 views)
kar_bon is offline   Reply With Quote