Daily

Random

Practice set

Baltic Way 2024 · Problem 17

Number Theory

Do there exist infinitely many quadruples (a,b,c,d)(a,b,c,d) of positive integers such that the number

a!+b!−c!−d!a!+b!-c!-d!

is prime and

2≤d≤c≤b≤a≤d2024?2\le d\le c\le b\le a\le d^{2024}?
Change pool

When you’re ready

Review material becomes available with the next Daily.

Review

Topics

Primes · Diophantine equations

Solutions

Solution

Answer: No. Solution: Assume that there exists a prime p<dp<d such that p∤abcdp \nmid a b c d. Then, since p−1∣d!p-1 \mid d! and p∤dp \nmid d, by Fermat's little theorem dd!≡(dp−1)d!p−1≡1( mod p)d^{d!} \equiv\left(d^{p-1}\right)^{\frac{d!}{p-1}} \equiv 1(\bmod p). By the same argument aa!≡bb!≡cc!≡1a^{a!} \equiv b^{b!} \equiv c^{c!} \equiv 1 ( mod p)(\bmod p), and therefore aa!+bb!−cc!−dd!≡1+1−1−1≡0( mod p)a^{a!}+b^{b!}-c^{c!}-d^{d!} \equiv 1+1-1-1 \equiv 0(\bmod p). Now we prove that for big enough dd, the product PP of primes less than dd is at least d10000d^{10000}. Assume d>210001⋅100022d>2^{\frac{10001 \cdot 10002}{2}}. Notice that by Bertrand's postulate, the biggest prime less than dd is at least d2\frac{d}{2}, the second biggest is at least d4\frac{d}{4} etc., and 10001-th biggest is at least d210001\frac{d}{2^{10001}}. So

P≥d2d4⋯d210001=d10001210001⋅100022≥d10000P \geq \frac{d}{2} \frac{d}{4} \cdots \frac{d}{2^{10001}}=\frac{d^{10001}}{2^{\frac{10001 \cdot 10002}{2}}} \geq d^{10000}

Now note that the number of quadruples where d<210001⋅100022d<2^{\frac{10001 \cdot 10002}{2}} is finite, because all the number are bounded above by d2024d^{2024} and hence by 210001⋅100022⋅20242^{\frac{10001 \cdot 10002}{2}\cdot 2024}. When d≥210001⋅100022d \geq 2^{\frac{10001 \cdot 10002}{2}} we have abcd≤a b c d \leq d1+3⋅2024<d7000d^{1+3 \cdot 2024}<d^{7000} and since P≥d10000P \geq d^{10000}, there exist at least two primes pp and qq, less than dd, that do not divide abcda b c d. But then by our first result, we have pq∣aa!+bb!−cc!−dd!p q \mid a^{a!}+b^{b!}-c^{c!}-d^{d!}, so it cannot be prime. Remark: The solution can be modified as follows. We can proceed in the first paragraph to conclude that aa!+bb!−cc!−dd!a^{a!}+b^{b!}-c^{c!}-d^{d!} is not prime. Indeed, if aa!+bb!−cc!−dd!=pa^{a!}+b^{b!}-c^{c!}-d^{d!}=p where p<dp<d then definitely a>da>d (otherwise a=b=c=da=b=c=d and aa!+bb!−cc!−dd!=0a^{a!}+b^{b!}-c^{c!}-d^{d!}=0 ). Hence

d>p=aa!+bb!−cc!−dd!≥aa!−dd!=(a(d+1)⋅…⋅a)d!−dd!≥(ad+1)d!−dd!≥ad+1−d>dd+1−d>d2−d=(d−1)d≥d\begin{aligned} d & >p=a^{a!}+b^{b!}-c^{c!}-d^{d!} \geq a^{a!}-d^{d!}=\left(a^{(d+1) \cdot \ldots \cdot a}\right)^{d!}-d^{d!} \\ & \geq\left(a^{d+1}\right)^{d!}-d^{d!} \geq a^{d+1}-d>d^{d+1}-d>d^{2}-d=(d-1) d \geq d \end{aligned}

contradiction. Then in the last paragraph, there is no need to find two primes less than dd that do not divide abcda b c d, one is enough.

Contest context

Results from Baltic Way 2024

11 teams

Mean score
1.9 / 5
Scores of 4 or 5
4 / 11
Estonia
0 / 5

Score distribution

06
10
21
30
41
53
All team scores
TeamScore
Poland5 / 5
Estonia0 / 5
Germany5 / 5
Ukraine0 / 5
Latvia2 / 5
Norway5 / 5
Lithuania0 / 5
Sweden0 / 5
Denmark0 / 5
Finland4 / 5
Iceland0 / 5