Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEA
Hi Maveryx,
A solution to last week’s challenge can be found here.
Roland van Leeuwen submitted this idea a while back, and now is the right time to share it! With 2024 approaching, let's determine our unique lucky numbers. Thanks, @RWvanLeeuwen, for your contributions to our Community!
In the quiet town of Serendipity Springs, there exists a magical tradition linked to Kaprekar's constant. Residents believe that the enchanted number 6174 holds the key to unlocking good fortune. This mystical connection is celebrated every New Year's Eve, adding an air of excitement and mystery to the festivities.
Following the rules of Kaprekar's constant, the townsfolk take their birth year, arrange the digits in both ascending and descending order, subtract the smaller number from the larger one, and continue the process until they reach the magical number 6174. The number of iterations used in this process is believed to represent their individual lucky number.
For instance, if someone has 1977 as the birth year, the following process is applied:
(Note: To apply Kaprekar’s constant, the number should contain at least two different digits, and leading zeros are allowed).
If you were born in 1977, according to Serendipity Springs habitants, your lucky number is 6.
Long story, right? What is your challenge then?
Imagine using Alteryx Designer to validate Kaprekar’s constant and generate your lucky number!
Tasks:
Task 1: Validate the process that all four-digit integer numbers with at least two distinct digits will transform into 6174 when applying the rules of Kaprekar’s constant.
Task 2: Find the highest and the lowest number of iterations you need to transform any four-digit number into 6174 using this rule set.
Task 3: Determine your lucky number.
HINTS:
You can choose how you want to solve the challenge, but this is the route we would suggest:
Wishing you a Happy New Year from Alteryx Academy!
May the year ahead be filled with fantastic moments for everyone, and in 2024, get ready for new challenges, updates, and opportunities to strengthen your abilities!
Thank you for all your contributions to our Community in 2023!
My lucky number was "3"!
Maybe I am just being paranoid, but I somehow smell AOC from this weekly challenge. 🤣
Lucky number is 3 for me. Now I need to find another half dozen algorithms to fill out the rest of my lottery ticket.
Workflow
Macro
Lucky Number 6. Feel bad for anyone born in a repeated digit year (e.g. 1111), who have no lucky number :`(
Only need 1 iterative macro (no batch macro):
I hope y'all had a Merry Christmas and have a Happy New Year! Happy Solving!!!