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.
alteryx Community

# Weekly Challenge

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

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

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

Submit Feedback

## Challenge #187: Generate Prime Numbers

12 - Quasar

5 - Atom

Hi, Here's my solution, which is i think more efficient in terms of space and time complexity. Because it generates less rows compared to append fields or generating all the dividends. It is able to generate not only 0-50 but more than that, efficiently. It can generate prime numbers from 0-10000 by 1 second.

8 - Asteroid
Spoiler
8 - Asteroid
Spoiler
I love this challenge.. But definitely can be optimised.. I can already hear a whirring sound when I tested for up to 9999. 😛

5 - Atom

My solution attempts to be efficient with O(n log n). I avoided the append tool because on a bigger scale, if used, performance will be O(n^2) because it would generate n x n rows, more than is necessary to solve this.

Spoiler

Generating the numbers from 2 to n is just O(n) and seems unavoidable.
But the second generate rows tool creates the minimal number of divisors to figure this out.

8 - Asteroid

Math challenges are always fun 🙂

Spoiler

17 - Castor

On a spree to binge complete weekly challenges
Adrenaline rush

Spoiler
This is my solution

8 - Asteroid

Here is my solution. ; )

11 - Bolide

#187

Spoiler
9 - Comet
Spoiler

Looking forward to seeing the different ways people solved this problem!