Sep-03-2020, 02:34 PM
Ok, I got that alright. Here:
it automatic. If I'm going to be searching millions of start numbers I can't do
it by hand.
I also tried to put in a counter for max chain length (inside the 'íf len(div) == 2:'
statement but it's not accurate. Since each 'level' of the tree can have anywhere
from 0 up to 2^(n-1) leaves, I may have to put in some conditionals to keep track,
although I'm not sure how that would work yet.
Ok, I'll look at that also.
try: divisors(newList[passes]) passes += 1 except: breakIt seems to give the same results as yours. I have since added more code to make
it automatic. If I'm going to be searching millions of start numbers I can't do
it by hand.
I also tried to put in a counter for max chain length (inside the 'íf len(div) == 2:'
statement but it's not accurate. Since each 'level' of the tree can have anywhere
from 0 up to 2^(n-1) leaves, I may have to put in some conditionals to keep track,
although I'm not sure how that would work yet.
Quote:You could use recursion to build the tree.
Ok, I'll look at that also.