Factor

Factorer

Factors of 44100 are 2 2 3 3 5 5 7 7

Instructions

Requires Internet Explorer 4.0+ with Javascript enabled. I have not tested this program with any other browser.

Just enter the integer to be factored in the box above and click "Go!". The factorization appears above, just below the box, as well as below these instructions in the Previous Outputs section. The output is deliberately simple. For instance, the factorization of 72 is reported as "2 2 2 3 3" rather than "23 × 32". This is a simple program and you're welcome to take it and adapt it. Adding multiplication signs of your choice to the output is a very simple matter. Making the program format exponents takes a little more work but is also simple.

I think this program is ideal for when you want to factor a few 5- to 10-digit integers but don't feel like launching Mathematica just for that. This little program can of course handle smaller integers, and also larger integers; theoretically, it can handle the largest integer that Javascript can handle. It can factor integers up to 10 digits instantaneously. Beyond that, depending on the size of the integer and its smallest prime factor, it can take longer.

Large numbers with a large smallest prime factor can show quite explicitly the shortcomings of factoring by trial division. On Mac OS 9, the cursor might change to the spinning disc for several seconds, and if you have music playing, it might pause while the calculation is going on. On Windows XP, Internet Explorer might show a dialog box informing you that a script on this webpage is making your computer sluggish, and offering you a chance to abort the script. I wrote this program to display a little message that says "Calculating..." while it runs, but I have never seen that message come up. If you need to factor a really large number, then I suggest you launch Mathematica or some heavy duty math program like that.

Lastly, a word about the Previous Outputs. Each factorization you ask of this program gets written again in the Previous Outputs section. I think it's quite handy for when you want to look for patterns in the factorizations of integer sequences such as 1, 12, 123, 1234, 12345, etc., or 1, 31, 331, 3331, 33331, etc. But note that if you hit Refresh, the contents of the Previous Outputs section are lost. If you ask Internet Explorer to save the page, it saves the underlying HTML and the Javascript, but it does not save the contents of the Previous Outputs section. What you can do is copy the text and save it into a text editor such as NotePad or BBE Edit.

Previous Outputs

Calculating...