From b4c8909835ca6b28901fb34790d37e9059668bce Mon Sep 17 00:00:00 2001 From: Philippe Zwietering Date: Fri, 17 Apr 2020 13:12:57 +0200 Subject: [PATCH] Added python file for 26, thinking about approach --- 26/main.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 26/main.py diff --git a/26/main.py b/26/main.py new file mode 100644 index 0000000..e933628 --- /dev/null +++ b/26/main.py @@ -0,0 +1,8 @@ +# Find the number d < 1000 for which 1 / d has the longest recurring cycle +# in its decimal fraction part + +# Observation: I first thought we only need to check prime numbers, but +# that is not the case. For example, 1/21 has a cycle of length 7, longer +# than both 3 and 7, but exactly the same as the cycles of 3 and 7 combined. +# But for 1/49 it has a cycle of length 42, so I don't think there is a +# clever way to deduce the length of the cycles without calculating them \ No newline at end of file