Skip to main content
12 events
when toggle format what by license comment
Apr 13, 2020 at 20:19 comment added Yukulélé Since all primes above 3 are of the form 6n±1 can we improve with something like factor += (k = !k) ? 2 : 4?
Apr 13, 2020 at 18:58 comment added Martin R @Yukulélé: No, because n decreases in each loop iteration.
Apr 13, 2020 at 18:56 comment added Yukulélé At each iteration, you have to calculate factor², wouldn't it be faster to compare factor with √n (calculated only once)?
Feb 28, 2018 at 19:11 history edited Martin R CC BY-SA 3.0
deleted 2 characters in body
Feb 23, 2016 at 14:55 vote accept Aaron
Feb 22, 2016 at 20:51 history edited Martin R CC BY-SA 3.0
added 280 characters in body
Feb 20, 2016 at 22:08 history edited Martin R CC BY-SA 3.0
added 2 characters in body
Feb 20, 2016 at 20:04 history edited Martin R CC BY-SA 3.0
added 21 characters in body
Feb 20, 2016 at 19:58 history edited Martin R CC BY-SA 3.0
added 21 characters in body
Feb 20, 2016 at 19:41 history edited Martin R CC BY-SA 3.0
added 2 characters in body
Feb 20, 2016 at 19:35 history edited Martin R CC BY-SA 3.0
added 2 characters in body
Feb 20, 2016 at 19:30 history answered Martin R CC BY-SA 3.0