Given is a prime number $p$. Find the number of positive integer solutions $(a, b, c, d)$ of the system of equations $ac+bd = p(a+c)$ and $bc-ad = p(b-d)$.
Problem
Source: Serbia TST 2021, P3
Tags: system of equations, number theory, Serbia, prime numbers, Diophantine Equations
25.10.2021 18:00
first of all let we divide $ac+bd=p(a+c)(mod a)$ $bd=pc mod(a)$ divide by c $bd=pa(mod (c))$ which shows pa =pc a=c $bd=0 mod(a)$ $bd = 0 mod(c)$ b=ka for k positive integer d=lc for l positive integer $bc-ad = pb-pd(mod b)$ $-ad=-pd(modb)$ $pd-ad=0(mod b)$ $p(d-a)=0(mod b)$ b|d or b|(d-a) now divide by d $bc=pb (mod d)$ $bc-pb=0(mod d)$ $b(c-p) = 0 (mod d)$ d|b or d|c-p b|d or d|b it shows that b=d c^2+d^2 = p(2c) $c^2+d^2 = p(2c) mod c$ $d^2 = 0 mod c$ again it show c|d a=b=c=d $a^2+a^2=p(2a)$ $2a^2 = p*2a$ $a = p $ $let \ test a = b =c =d =2$ 4+4 = 2(4) test a = b =c =d =3 $9+9=3(6)$ so the answer is when a = b = c =d=p CMIIW
26.10.2021 15:03
StarLex1 wrote: first of all let we divide $ac+bd=p(a+c)(mod a)$ $bd=pc mod(a)$ divide by c $bd=pa(mod (c))$ which shows pa =pc a=c $bd=0 mod(a)$ $bd = 0 mod(c)$ b=ka for k positive integer d=lc for l positive integer $bc-ad = pb-pd(mod b)$ $-ad=-pd(modb)$ $pd-ad=0(mod b)$ $p(d-a)=0(mod b)$ b|d or b|(d-a) now divide by d $bc=pb (mod d)$ $bc-pb=0(mod d)$ $b(c-p) = 0 (mod d)$ d|b or d|c-p b|d or d|b it shows that b=d c^2+d^2 = p(2c) $c^2+d^2 = p(2c) mod c$ $d^2 = 0 mod c$ again it show c|d a=b=c=d $a^2+a^2=p(2a)$ $2a^2 = p*2a$ $a = p $ $let \ test a = b =c =d =2$ 4+4 = 2(4) test a = b =c =d =3 $9+9=3(6)$ so the answer is when a = b = c =d=p CMIIW I don't think this is correct. $(a, b, c, d, p) = (25, 5, 25, 5, 13)$ is a counter-example.
26.10.2021 17:01
@StarLex1 You should stop fakesolving the problems.
26.10.2021 21:30
If I haven't made a mistake, the answer is $11$ for $p=4k+1$, $5$ for $p=2$ and $3$ for $p=4k+3$. (the answers written are of form $(a,c,b,d)$ call the first equality * and the second ** first we deal with the case $p|a,c$ : set $a=px, c=py$ then * turns into $xyp^2+bd=p^2*(x+y)$ hence $p^2|bd$ now if $p|b,d$ then setting $b=pz, d=pt$ we conclude that * turns into $xy+zt=x+y$ so $x+y\leq x+y-1+zt\leq xy+zt$. the equality case requires $z=t=1$ then ** turns into $x=y$ thus * becomes $x^2+1=2x$ which gives us $x=1$ so in this case, we get the answer $(p,p,p,p)$ otherwise, we get (WLOG because $b,d$ can be interchanged) $p^2|b, gcd(p,d)=1$. set $b=p^2z$. we see that * turns into $xy+zd=x+y$ similar to the last part we get that $z=d=1$ thus, ** turns into $p^2y-x=p^2-1$ and * becomes $(x-1)(y-1)=0$. combining the two gives us $x=y=1$ hence this gives us the answer $(p,p,p^2,1)$ and similarly we get $(p,p,1,p^2)$. So now $p \not| gcd(a,c)$. if $p|b,d$: set $b=zp, d=tp$ then, * becomes $ac+p^2zt=p(a+c)$ thus (WLOG because $a,c$ can be interchanged) $p|a$. set $a=px$ we know that $p \not| c$. again, we see that * turns into $xc+pzt=px+c$ thus $p|(x-1)c$ so we can set $x=py+1$. now * is $yc+zt=yp+1$ so $p\geq c$. looking at ** we have $zc-p^2ty=pz$ so $c>p$. a contradiction. this part gives no new answer. so now $p \not| gcd(b,d)$. all that is left is to check for $p\not| gcd(a,c), gcd(b,d)$: multiplying * and ** so that the $p$ cancels out, gives us $d(a^2+b^2)=b(c^2+d^2)$ which we will call ***. looking at **and *** it is clear that $b|a^2d,d(a-p),d(a^2-p^2)$ and $d|c^2b, b(c-p),b(c^2-d^2)$. now if $p\not|bd$ then it is clear that $b|dp^2, d|bp^2$ thus $b=d$. putting this in ** we get that $a=c$. we turn our attention to * to see that it is equivalent to $(a-p)^2+b^2=p^2$. it is a known fact that for $p=4k+1$ the answers to $x^2+y^2=P$ are $(x_0,y_0)$ and $(p,0)$ where $x_0\neq y_0$ are unique and not divisible by p. for other $p$'s we have only the trivial solution which we have already counted in previous parts. so for $4k+1$ we get the new answers $(p+x_0,p+x_0,y_0,y_0)$, $(p+y_0,p+y_0,x_0,x_0)$, $(p-x_0,p-x_0,y_0,y_0)$ and $(p-y_0,p-y_0,y_0,y_0)$. all that is left is to check $p|bd$. let (WLOG again) $p|b$ so $p \not|d$. by the previous divisibilities we get that $p|a$. set $b=zp, a=xp$. now,* is $xc+zd=px+c$ and ** is $zc-xd=pz-d$. multiplying * and ** by $d$ and $c$ and combining, gives us $p|z(c^2+d^2)$ and $p|x(c^2+d^2)$ if $p\not| c^2+d^2$, we set $z=pt$ and get that * becomes $xc+ptd=px+c$ so $p|c(x-1)$ thus $x=py+1$. so we have $yc+td=py+1$ and $tc=pt+dy$ so similar to before, $c>p\geq c$. a contradiction. now if $p|c^2+d^2$, this is only valid for $p=4k+1, p=2$ then by combining * and ** we get that $z(c^2+d^2)=p(xd+cz)$ thus $z|xd$ so now by looking at ** which is $zc-xd=pz-d$ we get that $z|d$. we also know that $d|zc^2, z(c-p)$ and $p\not|d$ so $d|z$ so $z=d$. now, ** turns into $c=p+x-1$ and using this in *, we have $(x-1)^2+z^2=p$. which gives the final four answers for $p=4k+1$ as $(p(s+1),p+s,pt,t)$, $(p(t+1),p+t,ps,s)$, $(p+s,p( s+1),t,pt)$ and $(p+t,p(t+1),s,ps)$ where $s^2+t^2=p$ (which are unique and different). and for $p=2$ gives us the two answers $(4,3,2,1)$ and $(3,4,1,2)$ we have exhausted all cases.
26.10.2021 22:41
for both)
26.10.2021 23:09
Indeed, I had forgotten to write two examples for $4k+1$ in the third part, although it brings it up to $7$ which again, correct me if im wrong but I think is the answer fot $4k+1$ unless I'm not seeing something as the other four solutions we get in that part have already been found or are invalid as we are dealing with strictly positive integers. The part about $2$ you are absolutely right though, I've found the part that is wrong and will fix it later if I get the time.
26.10.2021 23:22
If $p=m^2+n^2$ you can have $(p+m,n,pm+p,pn)$ and the other three you obtain by swapping $(a,b)$ with $(c,d)$ and $m$ with $n$
26.10.2021 23:30
Ah, I see. You are indeed correct