(divisors z) → (Listof Natural)
z : Integer
Returns a list of all positive divisors of the integer z. The divisors appear in ascending order.

Another reason why Racket rocks, because optimizing trial-division for large numbers.

It makes solving the Fermat Exponent problem easy:

http://pastebin.com/embed_js.php?i=4MR6D39a

Apparently, there was a period of time in Beethoven’s transition from classical formalist to bombastic romanticist (possibly accompanied by severe hearing loss and disillusionment with Napoleon) when musicians said, (translated from 19th-century German), “What the heck, Beethoven! This isn’t music! My kids could write this!”

Elsewhere:

Advertisements