Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAThis one was fun and fast!! Didn't have to peek or google on this one, adds to my confidence...
Regards,
Arjan Loogman
Here's my solution which allows you to set up what maximum value you want to find prime numbers for (limited to 10k, but can be increased)
I essentially use an iterative macro within a macro. Solution below.
Decided I make it slighty more efficient by skipping all even numbers and appending only numbers that are smaller than my starting number. Batched it on number and was good to go. Still super brute-force 😄
Nice simply idea to remove even numbers - I amended my solution to do the same (which doesn't use a macro and doesn't just compare smaller numbers) and it reduced the run time from 55 seconds to just under 10.
Second solution posted, but optimized using an Iterative macro. The flow initial value can be updated to find more or less primary numbers.