Maths Olympiad Prep

Library / /45 of 65

Number theory Difficulty 6.2 National Olympiad Prove it Bulgaria

Problem:

In a school there are mm boys and jj girls, m1,1j<2004m \geq 1, 1 \leq j < 2004.
Every student has sent a post card to every student. It is known that the number of the post cards sent by the boys is equal to the number of the post cards sent by girl to girl. Find all possible values of jj.

Solution

Solution:

It follows by the given condition that m(m+j1)=j(j1)m(m+j-1)=j(j-1) and hence m2=(jm)(j1)m^{2}=(j-m)(j-1). If pp is a prime divisor of jmj-m and j1j-1, then it divides mm. Therefore pp divides jj and 11. This contradiction shows that jmj-m and j1j-1 are coprime. Then jm=u2j-m=u^{2} and j1=v2j-1=v^{2}, where uu and vv are non-negative integers. It follows that uv=muv=m and u2+uv=j=v2+1u^{2}+uv=j=v^{2}+1, and the condition 1j<20041 \leq j < 2004 gives 0v440 \leq v \leq 44. So, we have to solve in non-negative integers the equation
u2+uv=v2+1 u^{2}+uv=v^{2}+1
If v=0v=0, then u=1u=1. Assume that the pair (u0;v0)(u_{0}; v_{0}) is a solution of ()(*) and v01v_{0} \geq 1. Then u01u_{0} \geq 1. Since u0v01u_{0}v_{0} \geq 1, it follows that u0v0u_{0} \leq v_{0}. Moreover, it is clear that v0<2u0v_{0}<2u_{0}. Set v1=v0u0v_{1}=v_{0}-u_{0}, 0v1<v00 \leq v_{1}<v_{0}. We have that u02=v0(v0u0)+1=(u0+v1)v1+1=u0v1+v12+1u_{0}^{2}=v_{0}(v_{0}-u_{0})+1=(u_{0}+v_{1})v_{1}+1=u_{0}v_{1}+v_{1}^{2}+1. Set u1=u0v1=2u0v0>0u_{1}=u_{0}-v_{1}=2u_{0}-v_{0}>0. Then
(u1+v1)2=(u1+v1)v1+v12+1u12+u1v1=v12+1 (u_{1}+v_{1})^{2}=(u_{1}+v_{1})v_{1}+v_{1}^{2}+1 \Longleftrightarrow u_{1}^{2}+u_{1}v_{1}=v_{1}^{2}+1
i.e., we obtain a new solution of ()(*). If v1=0v_{1}=0, then u1=1u_{1}=1. If v11v_{1} \geq 1, then u11u_{1} \geq 1. Setting v2=v1u1<v1v_{2}=v_{1}-u_{1}<v_{1} and u2=u1v2u_{2}=u_{1}-v_{2}, we get in the same way a new solution. So, we get a sequence of non-negative integers v0>v1>v_{0}>v_{1}>\cdots. If vk=0v_{k}=0 for some kk, then uk=1u_{k}=1 and writing uk1,vk1,,u0,v0u_{k-1}, v_{k-1}, \ldots, u_{0}, v_{0}, we get the Fibonacci sequence.

Thus solutions of ()(*) are (u;v)=(1;0),(1;1),(2;3),(5;8),(13;21)(u; v)=(1; 0), (1; 1), (2; 3), (5; 8), (13; 21), and for the other solutions we have that v>44v>44. The first solution of ()(*) gives j=v2+1=02+1=1j=v^{2}+1=0^{2}+1=1 and then m=uv=0m=uv=0, which does not satisfy the given condition. The other solutions give the following solutions of the problem: j=12+1=2j=1^{2}+1=2, j=32+1=10j=3^{2}+1=10, j=82+1=65j=8^{2}+1=65 and j=212+1=442j=21^{2}+1=442.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.