Project Euler 132 - Large repunit factors

Official link: https://projecteuler.net/problem=132

Thought Process

We need a way to quickly check prime factors of this massive number, we can use the below fact, and the python pow function to handle this quite easily. All that is left is to generate a bunch of primes and test until we find 40. See Essential Functions for my prime generation function.

Interactive Code

Enter a number (yourinput)

Code will output the sum of the first yourinput prime factors of R(10^9)