Here's a JavaScript/HTML5/Canvas version.<p>You can view the first 100 diagrams in a grid or view the diagram for the N of your choice. There's also an option to view an alternative diagram where the drawing starts with the smallest prime instead of the smallest.<p><a href="http://jsfiddle.net/FEKX2/3/" rel="nofollow">http://jsfiddle.net/FEKX2/3/</a>
Install dependencies:<p><pre><code> cabal install arithmoi
cabal install diagrams
</code></pre>
Copy all the code from the blog post into a file (let's call it factor.hs). At the end of that file, add:<p><pre><code> main = defaultMain $ factorDiagram YOUR_NUMBER
</code></pre>
Then run:<p><pre><code> runhaskell factor.hs -o image.png -w 400</code></pre>
> Of course, this really only works well for numbers with prime factors drawn from the set {2, 3, 5, 7}.<p>So express the number as a sum of numbers with factors drawn from that set, and draw a several diagrams, one for each summand. A quick bit of Python confirms that every number under 14925 can be expressed as the sum of no more than three such numbers in the most obvious way possible (ie using a greedy algorithm).<p>For example, you might write 9999 as 9800 + 196 + 3, all of which have nice factorization diagrams.
Zero comments even though it's a nice read. I guess everyone suddenly got busy after reaching the paragraph "I wish I knew how to make a website where you could enter a number and have it show you the factorization diagram… maybe eventually." :)
Here's my version: <a href="http://cocoflunchy.github.com/factorviewer/" rel="nofollow">http://cocoflunchy.github.com/factorviewer/</a>
Not perfect at all... but it works.