From b5c49f6d1ceea9574cbe1888093f3b45e8bb551b Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Sun, 8 Jun 2014 22:57:25 -0400 Subject: [PATCH] added a sample package --- samples/Mathematica/Problem12.m | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 samples/Mathematica/Problem12.m diff --git a/samples/Mathematica/Problem12.m b/samples/Mathematica/Problem12.m new file mode 100644 index 00000000..2e8e0ac7 --- /dev/null +++ b/samples/Mathematica/Problem12.m @@ -0,0 +1,8 @@ +(* ::Package:: *) + +(* Problem12.m *) +(* Author: William Woodruff *) +(* Problem: What is the value of the first triangle number to have over five hundred divisors? *) + +Do[If[Length[Divisors[Binomial[i + 1, 2]]] > 500, + Print[Binomial[i + 1, 2]]; Break[]], {i, 1000000}]