Let's write the following expression in a simpler form:

$$
\frac{\frac{a_{1}\left(a_{1}-a_{2}\right)}{a_{2}+a_{3}+\ldots+a_{n}}+\frac{a_{2}\left(a_{2}-a_{3}\right)}{a_{1}+a_{3}+a_{4} \ldots+a_{n}}+\ldots+\frac{a_{n}\left(a_{n}-a_{1}\right)}{a_{1}+a_{2}+\ldots+a_{n-1}}}{\frac{a_{1}-a_{2}}{a_{2}+a_{3}+\ldots+a_{n}}+\frac{a_{2}-a_{3}}{a_{1}+a_{3}+a_{4}+\ldots+a_{n}}+\ldots+\frac{a_{n}-a_{1}}{a_{1}+a_{2}+\ldots+a_{n-1}}}
$$
Obviously $n \geq 2$. Let $a_{1}+a_{2}+\ldots+a_{n}=S$, then the denominator of the $i$-th term in the numerator and the denominator is $S-a_{i}$, where $i=1,2, \ldots, n$. We assume that each of these, as well as (1), has an integer denominator different from 0.

For $n=2$, $S=a_{1}+a_{2}$, and the expression is:

$$
K_{2}=\frac{\frac{a_{1}\left(a_{1}-a_{2}\right)}{S-a_{1}}+\frac{a_{2}\left(a_{2}-a_{1}\right)}{S-a_{2}}}{\frac{a_{1}-a_{2}}{S-a_{1}}+\frac{a_{2}-a_{1}}{S-a_{2}}}=\frac{\left(a_{1}-a_{2}\right)\left(\frac{a_{1}}{a_{2}}-\frac{a_{2}}{a_{1}}\right)}{\left(a_{1}-a_{2}\right)\left(\frac{1}{a_{2}}-\frac{1}{a_{1}}\right)}=\frac{a_{1}^{2}-a_{2}^{2}}{a_{1}-a_{2}}=a_{1}+a_{2}
$$

indeed, due to the assumption that the large denominator is not zero, the simplifications by $a_{1}-a_{2} \neq 0$ were allowed.

We will show that for $n>2$ the expression is also equal to $S$. Multiply the denominator of (1) by $S$, and in the case of the $i$-th term, by $S=\left(S-a_{i}\right)+a_{i}$. Multiplying the first term gives the numerator of the corresponding fraction, which for $i=1,2, \ldots, n-1$ is $a_{i}-a_{i+1}$, and for $i=n$ it is $a_{n}-a_{1}$. Multiplying by the second term gives the corresponding term of the numerator of (1). Summing up the first products

$$
\left(a_{1}-a_{2}\right)+\left(a_{2}-a_{3}\right)+\ldots+\left(a_{n-1}-a_{n}\right)+\left(a_{n}-a_{1}\right)=0
$$

is obtained, therefore the large denominator is indeed equal to the numerator multiplied by $S$. Thus, the simplified form of the expression is $a_{1}+a_{2}+\ldots+a_{n}$.

The $n+1$-th condition for the numbers $a_{1}, a_{2}, \ldots, a_{n}$, i.e., that the large denominator $\neq 0$, is hardly replaceable by simpler conditions.

Draschitz Rudolf (Budapest, Landler J. Gép- és Híradásip. Techn., III. o. t.)

# Remark. Let 

$$
\begin{aligned}
& s(x)=\frac{a_{1}\left(a_{1}-a_{2}\right)}{x-a_{1}}+\frac{a_{2}\left(a_{2}-a_{3}\right)}{x-a_{2}}+\ldots+\frac{a_{n}\left(a_{n}-a_{1}\right)}{x-a_{n}} \\
& n(x)=\frac{a_{1}-a_{2}}{x-a_{1}}+\frac{a_{2}-a_{3}}{x-a_{2}}+\ldots+\frac{a_{n}-a_{1}}{x-a_{n}}
\end{aligned}
$$

then the value of the expression in the problem is equal to the value of the function $f(x)=\frac{s(x)}{n(x)}$ at $x=a_{1}+a_{2}+\ldots+a_{n}$. Suppose that

$$
x \neq a_{1} ; \quad x \neq a_{2} ; \quad \ldots ; \quad x \neq a_{n} ; \quad n(x) \neq 0
$$

thus the denominators of the fractions in the definition of $s(x), n(x)$, and $f(x)$ are different from 0. (This assumption, together with $x=a_{1}+a_{2}+\ldots+a_{n}$, means that the denominators of the fractions in (1) are different from 0.) First, write the function

$$
g(x)=x \cdot n(x)-s(x)
$$

in a simpler form; in the difference on the right side, combine the fractions with the same denominator, we get

$$
\begin{aligned}
g(x) & =\frac{\left(a_{1}-a_{2}\right)\left(x-a_{1}\right)}{x-a_{1}}+\frac{\left(a_{2}-a_{3}\right)\left(x-a_{2}\right)}{x-a_{2}}+\ldots+\frac{\left(a_{n}-a_{1}\right)\left(x-a_{n}\right)}{x-a_{n}}= \\
& =\left(a_{1}-a_{2}\right)+\left(a_{2}-a_{3}\right)+\ldots+\left(a_{n}-a_{1}\right)=0
\end{aligned}
$$

under the conditions that ensure the definition of $s(x), n(x), f(x)$, thus $x \cdot n(x)-s(x)=0$, i.e., $f(x)=\frac{s(x)}{n(x)}=x$. This does not mean that the function $f(x)$ is identical to the function $f_{0}(x)=x$, since the domain of definition of $f(x)$ and $f_{0}(x)$ is not the same. In our statement, we only said that where $f(x)$ is defined, it is equal to $f_{0}(x)$.

Therefore, the value of the expression in the problem - if the denominators are different from 0 - is equal to $\left(a_{1}+a_{2}+\ldots+a_{n}\right)$. (If $n=1$, then $x \neq a_{1}$, so our expression is not defined.)