Fun With Numbers

Ken Jennings posses four questions about 2009 which I thought would be fun to answer by making a small JavaScript to calculate the answers:

From ken-jennings.com:

It turns out that 2009 is not a prime number, as I briefly wondered if it might be. In fact, one of its several divisors is a perfect square. What is that factor?

While you’re killing time on meaningless stuff (I imagine Friday is going to be a slow work day, if you’re in the office at all): what was the last year that had such a large perfect square as a factor? What will be the next one?

And what year is the next prime number?

Solution and code after the break. Continue reading “Fun With Numbers”