Weekly Challenges

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

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #187: Generate Prime Numbers

olga_strubbe
11 - Bolide

I loved this challenge, thank you, @Shreelatha!  

2024-02-15_14-05-12.png

 

danbostrom
8 - Asteroid

 

 

Amy_smart
11 - Bolide

Here is my solution.

Prathameshmanakapure
8 - Asteroid

My Solution

aatalai
14 - Magnetar

C187

Bobbyt23
12 - Quasar

Love using the MOD() function.

griffinwelsh
12 - Quasar

My solution

Carolyn
11 - Bolide

Solved. I was able to minimize the amount of numbers I generated by finding the square root of the Maybe-Prime, rounded down, and I knew I didn't have to test for factors above that, since I would catch them below that (e.g. if I was testing 90 -> I don't have to worry about testing above 9 (sqrt 90 = 9.49 -> 9) since any factors would be caught if I test 1-9. I don't have to worry about catching 45, since I'll catch it when I test 2. 30 gets caught when I test 3, etc)

 

I also went ahead and excluded the non-2 evens since no reason to mess around with them. 

 

Spoiler
2024-08-20_14-21-12.png

 

lwolfie
11 - Bolide

Fun one.  Although, mine might take some time as the number gets larger.

tammybrown_tds
9 - Comet

I love the "mathy" challenges.

 

Spoiler
Screenshot 2024-08-28 171512.png