You will study . The claim is that divides for every . You will collect evidence, find the largest common divisor of the values, and check the identity that the inductive step uses.
The idea. The step of the proof compares with . Here , which is clearly a multiple of . So if , then .
Your tasks.
remainders(N). Return the list of g(n) % 3 for n from 1 to N.common_divisor(N). Return the highest common factor of g(1), g(2), ..., g(N). Use gcd from the math module, starting from 0.step_part(k). Return g(k + 1) - g(k).Run your code once to unlock the worked solution.
Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…