5
u/Ezekiel375 Aug 21 '11
No joke. I feel like I'm cheating every time I fire up Mathematica (which happens every day at work, BTW). That google problem to find the first 10 digit problem in the sequence of pi? Solved it in a few lines. Then I looked for others' answers and found code in C. Terrifying to behold.
1
Nov 01 '11
You can still use Mathematica for ProjectEuler without cheating, just don't use built-ins that specifically solve the problems. Implement your own prime number enumerator, perhaps using the Sieve of Eratosthenes.
3
u/m42a Aug 20 '11
In Problem 99, you can completely ignore the fact that all the numbers you have to consider are huge, since Mathematica will sort them just fine. It's a pretty great program.
2
Aug 20 '11
Curious about different approaches to primality testing? The Fermat test is curious because it's probabilistic, and doesn't always tell you the truth.
6
u/lustikus Aug 20 '11
Problem 3: What is the largest prime factor of the number 600851475143 ? FactorInteger[600851475143]