I feel bad for not having worked on any problems since Problem 6. So here is my Mathematica solution to Problem 12.

Triangle[n_] := n (n + 1)/2;

n = 1;

While[Length[Divisors[Triangle[n]]] < 500, n++];
Print[Triangle[n]]
[/sourcecode]
As usual, I cheated by not programming in Python or Sage. But I figure this is better than nothing. I suspect I would get a lot more out of this programming project if I thought about how to write my own Divisors algorithm. Oh well.

### Like this:

Like Loading...

*Related*

Tags: cmd, mathematica, prob12

This entry was posted on June 17, 2009 at 5:49 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.

## Leave a Reply