Project Euler 26 - Reciprocal cycle

Official link:

Thought Process

I found the below theorem on repeating decimal length

When looking for the longest recurring cycle we only need to look for 1/d where d is a prime because of property 2 below

Interactive Code

Input an integer (yourinput)

Code will output the value of d < yourinput for which 1/d contains the longest recurring cycle in its decimal part