View Single Post
Old 10-23-2011, 03:11 AM   #26
foilman8805
smoke wheat hail satin
FFR Simfile AuthorFFR Veteran
 
foilman8805's Avatar
 
Join Date: Sep 2006
Location: LA baby
Age: 35
Posts: 5,704
Default Re: THE project euler thread

Interesting, I actually had to augment the source code in MATLAB in order to do Problem 3.

For some reason MATLAB arbitrarily sets a limit on prime factoring numbers larger than 2^32. Opened up the factor.m and changed it to 2^50, so this solution pretty much became a one-liner.

Problem 3
Code:
%% Euler Project - Problem 3

% The prime factors of 13195 are 5, 7, 13 and 29.

% What is the largest prime factor of the number 600851475143?

pf = factor(600851475143);

lpf = max(pf)
foilman8805 is offline   Reply With Quote