MathDB
Extract primes

Source: St Petersburg Olympiad 2010, Grade 10, P6

September 14, 2017
number theory

Problem Statement

Natural number NN is given. Let pNp_N - biggest prime, that N \leq N. On every move we replace NN by NpNN-p_N. We repeat this until we get 00 or 11. Prove that exists such number NN, that we need exactly 10001000 turns to make 00