Skip to main content
11 events
when toggle format what by license comment
Sep 21 at 8:14 comment added Davislor Also be aware that most of the answers you’ll find online for this problem are wrong, and would report the largest prime factor of 10 as 2, not 5. (You can optimize by sieving only up to n/2, but the largest prime factor could be greater than the square root of n.)
Aug 18 at 11:32 answer added Andy Richter timeline score: 0
Feb 3, 2014 at 4:30 answer added 200_success timeline score: 3
Feb 3, 2014 at 3:21 history edited 200_success
edited tags
Feb 3, 2014 at 2:22 history edited Jamal CC BY-SA 3.0
added 15 characters in body; edited title
Mar 27, 2013 at 23:14 review First posts
Mar 28, 2013 at 0:02
Mar 25, 2013 at 1:08 comment added tb- If you are trying to find all primes in a given range, take a look at the sieve of Eratosthenes. It is the easiest and probably fastest way for integer/long. Rest is already answered. An other approach to the given problem could be to try to divide by all smaller numbers until the current sqrt. The last number is the result.
Mar 21, 2013 at 14:14 vote accept Atom
Mar 21, 2013 at 3:22 answer added amon timeline score: 6
Mar 20, 2013 at 23:40 answer added GameDroids timeline score: 4
Mar 20, 2013 at 23:06 history asked Atom CC BY-SA 3.0