Problem #PRU-5008

Problems Cryptography Number theory

Problem

Elon is studying the Twitter server. Inside the software he found two integer variables \(a\) and \(b\) which change their values when special search queries “RED”, “GREEN”, and “BLUE” are processed. More precisely the pair \((a, b)\) changes into \((a + 18b, 18a - b)\) when processing the query “RED”, to \((17a + 6b, -6a + 17b)\) when processing “GREEN”, and to \((-10a - 15b, 15a - 10b)\) when processing “BLUE”. When any of \(a\) or \(b\) reaches a multiple of \(324\), it resets to \(0\). If \((a, b) = (0, 0)\) the server crashes. On the server startup, the variables \((a, b)\) are set to \((20, 20)\). Prove that the server will never crash with these initial values, regardless of the search queries processed.