MathDB
Prove that if $q+q^{'} =r +r^{'}$, then $2n$ is a perfect square.

Source: Caucasus MO 2023

July 16, 2023
number theory

Problem Statement

Let nn{} and mm be positive integers, n>m>1n>m>1. Let nn{} divided by mm have partial quotient qq and remainder rr (so that n=qm+rn = qm + r, where r{0,1,...,m1}r\in\{0,1,...,m-1\}). Let n1n-1 divided by mm have partial quotient qq^{'} and remainder rr^{'}. a) It appears that q+q=r+r=99q+q^{'} =r +r^{'} = 99. Find all possible values of nn{}. b) Prove that if q+q=r+rq+q^{'} =r +r^{'}, then 2n2n is a perfect square.