Find all positive integer $n$ and nonnegative integer $a_1,a_2,\dots,a_n$ satisfying: $i$ divides exactly $a_i$ numbers among $a_1,a_2,\dots,a_n$, for each $i=1,2,\dots,n$. ($0$ is divisible by all integers.)
Problem
Source: KJMO 2017 p1
Tags: number theory, KJMO
07.01.2020 03:34
Romania Jbmo TST 2008
06.11.2020 01:23
Note that if $a_i=0$, we have that $i$ divides 0 which contradicts that no term is divisible by $i$. Therefore, each $a$ has to be positive; this also means that we need to have $n,n-1,n-2\ldots \lfloor\frac{n}{2}\rfloor+1$ be among the sequence ${a}$ as $a_i\le n$ and each integer in the aforementioned list only divides itself in the range $[1,n]$. Obviously $a_1=n$, and suppose that $a_k=n-1$; if $n\ge 7$, we have that ${a}$ includes $n,n-1,n-2,n-3$ and since consecutive integers are relatively prime, at least two will not be divisible by $k$. Thus, $n\le 6$ and by reviewing all cases, we have that $a_1=1$ and $a_1=2,a_2=1$ are our only solutions.
11.05.2023 00:02
My solution which is kind of an improvement????? It is obvious that all the A(i) are ≤ n. This is true because there are only n numbers, and there’s no way some number can have n+1or more multiples. It is pure hypocrisy to have any a(k) = 0. Then this 0 is itself a multiple of k, contradicting the statement. Thus we must have at least one of n, n-1, …… among the a(k) since each of them is greater than or equal to 1. Consider n-1. The best we can do is to have n-1 = a(2). And even then this requires 2(n-1) ≤ n means n≤2. Test 1 and 2, we find that 2 works and 1 works. So the solutions are: N=1, a(1) =1, and N=2, a(1) =2, a(2) = 1 or 2. Note that the previous solution is wrong at the last step? Because 2, 2 still works as both are multiples of 1 and multiples of 2. Please correct my possible mistake?