This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Here is my very un-mathematical solution. works up to 1000, but would probably blow up a computer if ran for a large number.
First weekly challenge!
First challenge completed!
Good fun! Solution is attached and available below
A little of a mess with the flags & logic in the formula tool, but surprisingly easy!
I've never used the generate Rows before - thought it would be better to use it in a batch macro - but the duplicated Append Fields method is much easier.
I tried two different versions - Brute force and using the method 'Sieve Of Eratosthenes'
The first one crashed around 100,000 records while the second can output results for 10M of records in 1 minute.
My attempt. Couldn't think how to tackle this easily using Alteryx tools, so had a go using the Python tool. Getting a strange error though regarding metadata, but outputs the answer.