alteryx Community

# 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.

## Challenge #418: To the Nth Degree and Beyond

Alteryx

Hi Maveryx,

A solution to last week’s challenge can be found here.

This challenge was submitted by Patrick Digan (@patrick_digan)  an Alteryx ACE and also an active Community member who has contributed to many challenges before. Thank you, Patrick!

This week’s challenge is inspired by a special day that just passed: Pi Day! Not the delicious treat, but the number with an infinite sequence of non-repeating decimals: 3.14, which is celebrated on March 14.

In honor of pi, this week your task is to find all 13 numbers less than or equal to 100,000 that are equal to the nth power of the sum of their digits. For example, 81 is a 2-digit number, so n=2, and (8+1)2 = 81; therefore, it falls under the category we are looking for.

For the input, use the Generate Rows tool to generate numbers from 0 to 100,000.

Bonus question: If you want to take your skills to the next level, you are invited to find all 17 numbers that are equal to any nth power of the sum of its digits. For example, 4,913 works for this. While it will fail for the first task because (4 + 9 + 1 + 3)4 = 83,521, the number 4,913 works well for the bonus question since (4 + 9 + 1 + 3)3 = 4,913.

Need a refresher? Review these lessons in Academy to gear up:

Good luck!

9 - Comet

Definitely enjoyed this one! My solution for basic and bonus question.

Spoiler

17 - Castor

My solution!

Spoiler

20 - Arcturus
Spoiler
16 - Nebula
Spoiler
8 - Asteroid

Here is my solution:

Spoiler
7 - Meteor
Spoiler
I *finally* got an iterative macro to work!  Hopefully I can get the bonus, too.
7 - Meteor

Here's my solution for both the main task and the bonus one that doesn't use REGEx

Spoiler
17 - Castor

Just doing the challenge for now - the bonus maybe another day 😊

Spoiler
6 - Meteoroid

This is very efficient 👍