ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

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 #79: Find the Closest Prime Number

ponraj
Púlsar

Here is my solution!

 

Spoiler
Prime Number - MacroPrime Number - MacroWorkflowWorkflow
JoshuaGostick
Cuásar

My solution :)

Spoiler
challenge_79.PNG
Karam
Asteroide

Solution attached. Interesting challenge!

 

Spoiler
challenge 79.PNG
Kenda
16 - Nebula
16 - Nebula
Spoiler
This one was fun.
I didn't go with the macro route. I just made the assumption that the prime number would occur within 11 plus or minus the given number. I then add a row for each number below that set of numbers and find the ones where the module is 0 only once. Then to find the closest, I take the difference between that list and the given number and keep only the lowest difference.
Capture.PNG

P.S. the community page isn't letting me post the .yxwz file so I had to export it before attaching to this post.
TonyA
Alteryx Alumni (Retired)

Here's my solution. I'm sure I could tighten this up but even as is I'm getting results for 10 digit numbers in under 3 seconds.

hanykowska
Bólido

I liked this one :)

RolandSchubert
16 - Nebula
16 - Nebula

My solution

KMiller
Asteroide

Solution attached. One macro for higher numbers and one for lower.

Spoiler
18-06-2019 08-54-36.png18-06-2019 08-54-50.png

 

OllieClarke
16 - Nebula
16 - Nebula

Went for an iterative macro to brute force this. Fun challenge :-)

Spoiler
challenge 79.PNG
Greg_Murray
Cuásar

Solution attached