The idea behind a Narcissistic Number is pretty simple: when you take a number with n digits and add it’s digits multiplied to the nth degree together, you’ll get that number. Basically, if I have a number abcd, a^4 + b^4 + c^4 + d^4 = abcd. Finding this manually is incredibly hard, and so I coded a tiny program to find it. It’s incredibly simple: just a for loop and a list, and you’re good to go! It was still fun though, especially since I was challenged to do so by my dad. My only roadblock was that I accidentally mixed up some Javascript into my Python code in the process, because the languages blur together in my mind sometimes. The code can be found here on my Github.


Leave a comment