Learning Scientific Programming with Python (2nd edition)

P5.1.2: The IPython %%timeit magic: highly composite numbers

Question P5.1.2

Using the fastest algorithm from the previous question, devise a short piece of code to determine the highly composite numbers less than 100000 and use the %%timeit cell magic to time its execution. A highly composite number is a positive integer with more factors than any smaller positive integer, for example: $1, 2, 4, 6, 12, 24, 36, 48, \cdots$.