Daily

Random

Practice set

Baltic Way 2025 · Problem 1

Algebra

Does there exist a sequence of integers a1,a2,…a_1,a_2,\ldots such that for each integer d≠0d\ne0 there are exactly 2025 distinct pairs of indices (i,j)(i,j) for which ai−aj=da_i-a_j=d?

Change pool

When you’re ready

Review material becomes available with the next Daily.

Review

Topics

Sequences and recurrences

Solutions

Solution

We will prove that there exists a sequence with the desired property.

Note first that if ai−aj=da_i-a_j=d, then aj−ai=−da_j-a_i=-d, so it is enough to prove that for each integer d>0d>0 there exist exactly 20252025 pairs (i,j)(i,j) such that ai−aj=da_i-a_j=d.

We construct the sequence inductively; let a1a_1 be an arbitrary integer.

Suppose we have chosen a1,a2,…,ana_1,a_2,\ldots,a_n such that for all d>0d>0 there are at most 20252025 pairs of indices 1≤i,j≤n1\le i,j\le n with ai−aj=da_i-a_j=d, and let ℓ>0\ell>0 be the least integer for which there are strictly fewer than 20252025 pairs of indices 1≤i,j≤n1\le i,j\le n with ai−aj=ℓa_i-a_j=\ell. Then let an+1≫ana_{n+1}\gg a_n and an+2=an+1+ℓa_{n+2}=a_{n+1}+\ell such that

an+2−ai>an+1−ai>aj−aka_{n+2}-a_i>a_{n+1}-a_i>a_j-a_k

for all 1≤i,j,k≤n1\le i,j,k\le n. This is clearly possible by taking an+1a_{n+1} large enough, and in doing so there is still no d>0d>0 such that there are more than 20252025 pairs 1≤i,j≤n+21\le i,j\le n+2 for which ai−aj=da_i-a_j=d.

By induction, we obtain a sequence a1,a2,…a_1,a_2,\ldots with the property that for each d>0d>0 there are at most 20252025 pairs (i,j)(i,j) with ai−aj=da_i-a_j=d. Since we choose the minimal ℓ\ell in each step, it is clear, however, that there will be exactly 20252025 such pairs for each d>0d>0. By the introductory remark, the constructed sequence satisfies the desired property.

Remark. There is an alternative solution relying on the fact that 20252025 is a perfect square. In the inductive step of the construction, if we instead choose ℓ\ell as simply the least positive integer not of the form ai−aja_i-a_j, and proceed as above, we obtain a sequence where each d≠0d\ne0 appears exactly once as ai−aja_i-a_j. Consider now the sequence

a1,…,a1,a2,…,a2,a3,…,a_1,\ldots,a_1,a_2,\ldots,a_2,a_3,\ldots,

where each aia_i appears 4545 times. For any d≠0d\ne0, we may now choose any of the 4545 copies of aia_i and any of the 4545 copies of aja_j for d=ai−ajd=a_i-a_j, giving a total of exactly 452=202545^2=2025 pairs (i,j)(i,j) satisfying d=ai−ajd=a_i-a_j.

Contest context

Results from Baltic Way 2025

11 teams

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

Score distribution

04
11
21
33
41
51
All team scores
TeamScore
Germany5 / 5
Estonia0 / 5
Poland0 / 5
Lithuania3 / 5
Norway0 / 5
Latvia4 / 5
Finland0 / 5
Denmark3 / 5
Sweden2 / 5
Ukraine1 / 5
Iceland3 / 5