Improve this recursive code please!

andrew cooke andrew at acooke.org
Sun May 11 11:29:39 EDT 2003


anton at vredegoor.doge.nl said:
[...]
> One question that remains is: Do we have enough mathematicians in this
> group to count the number of arrangements that are produced this way?

no, but as a programmer i can generate the sequence and search for it on
the web :o)

search for 1 1 2 3 5 7 11 15 22 30 42 56 77 101 135 176 231 297 385 490
at http://www.research.att.com/~njas/sequences/
(or sequence number A000041)

it returns a single result - i can't work out how to link directly - and
there's no nice simple formula (which cheered me up because i spent a
while trying to figure one out, but couldn't).

andrew

ps i used an earlier version of the code since i don't have 2.3 installed
- i presume it's still calculating the same thing!

-- 
http://www.acooke.org/andrew





More information about the Python-list mailing list