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

hpaulina
6 - Meteoroid

Dirty but works fine for the small numbers

ConradW
8 - Asteroid

Complete

kmcdaniel
8 - Asteroid
Spoiler
challenge187_screenshot.png
JonMcMillin
8 - Asteroid

Thanks ChristineB! that was deceptively hard! Originally I tried to use an iterative macro with factorials, but quickly run into field size, and big number challenges that Alteryx has. 

 

Then had to think of another way to skin the cat, that was not brute force 🙂

 

Spoiler
JonMcMillin_0-1572412110571.png
KMiller
8 - Asteroid

Solution attached using an iterative macro. The number 1 is included in the result for good measure.

Spoiler
2019-10-30_08-45-52.png2019-10-30_08-46-05.png2019-10-30_08-46-19.png
mtedw
7 - Meteor
Spoiler
challenge_187_ME_solution.PNG

Gave this one a good think ahead of attempting it, went down a few blind alleys and ended up with a simple solution. Want to iterate to solve where 50 can be replaced by 'x' though.

JamesCameron
8 - Asteroid

Here's my effort.

 

Macro is based on the Sieve of Eratosthenes algorithm: Wikipedia 

 

PaulRB
8 - Asteroid

My solution. Only 4 tools (excluding tools to check the answer).

 

Spoiler
image.png
JoshuaGostick
11 - Bolide

I feel as if there are various interesting ways to accomplish this!

 

Spoiler
challenge_187.PNG
dshirer
5 - Atom

First time doing a weekly challenge!

I used a macro which basically eliminates composite numbers, so that all that's left at the end is primes. I verified up to 10,000,000, which took 10min to run