Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
IDEAS WANTED

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Challenge #187: Generate Prime Numbers

Highlighted
11 - Bolide

Thanks for the challenge, @Shreelatha! I decided to try the Python tool this week.

 

 

Spoiler
challenge_187_workflow.PNG

kelly_gilbert_1-1572620688928.png

 

 

Highlighted
5 - Atom
Spoiler
Challenge 187.PNG
Highlighted
5 - Atom

Has anyone attempted this using the R input tool?

Highlighted
5 - Atom

My solution. Seems to work for other up-to numbers. First time I have generated a fairly clean solution in a relatively short time. Nice challenge!

Highlighted
5 - Atom

here is my attempt struggled to get 1 in there!

Spoiler
Thorntonb_1-1572631331558.png

 

Highlighted
5 - Atom

Fun one. Set mine up to find all primes from 1 - whichever value you feed it. Plug in 2019 to see if you were born in a Prime year.

Highlighted
8 - Asteroid

This was so much fun to do. Two files included (main portion and the batch macro) 

 

Spoiler
I created a macro that processed through the generated list of numbers in the source input. tested it for 50, 100 and 1000 (was slow)... not sure how large it can go before the performance would degrade completely. 

It checks divides each number by the entire list to find a count of any calculations that resulted in a whole number. if count is 0 then it gets left at the end. I had to hard code 1 and 2 to be removed from the results. 
Highlighted
8 - Asteroid

In order to speed up, only divisors up to FLOOR(SQRT(number)) needs to be verified whether they will lead to MOD(number, divisor) = 0.

 

Spoiler
LiD_3-1572739967475.png
Highlighted

Two approaches - the second one works the most efficient

 

Spoiler
challenge_187_SEH.PNG

 

Highlighted
12 - Quasar

Definitely not the most efficient way.

 

Spoiler
Capture.PNG