For which pairs of positive integers $a, b$ is the expression $a^{2}+b^{2}-a-b+1$ divisible by $a b$?
Only if $a=b=1$.

Suppose

$$
\begin{gathered}
a b \mid a^{2}+b^{2}-a-b+1, \quad a \leq b, \quad b>1 \quad \text { and } \quad a+b \quad \text { is as small as possible. Clearly } a \neq 1, \text { because if } a=1 \text {, then } \\
b \mid 1+b^{2}-1-b+1=b^{2}-b+1 .
\end{gathered}
$$

From this, $b \mid 1$ follows, but we assumed that $b>1$.

For some positive integer $k$,

$$
a^{2}+b^{2}-a-b+1=k a b
$$

Consider the equation obtained by rearranging (1):

$x^{2}-(k a+1) x+\left(a^{2}-a+1\right)=0$; according to (1), $b$ is a root of this equation. Let the other root of the equation be $c$. Using both relations between the roots and coefficients, we get

$$
c=(k a+1)-b=\left(a^{2}-a+1\right) / b
$$

$c$ is an integer because $c=k a+1-b$. On the other hand, $0<c<a$, since

$$
c=\frac{a^{2}-a+1}{b} \geq \frac{1}{b} \quad \text { and } \quad c=\frac{a^{2}-a+1}{b}<\frac{a^{2}}{b} \leq \frac{a^{2}}{a}=a \text {. }
$$

Thus, $0<c<a$ and $c^{2}-(k a+1) c+\left(a^{2}-a+1\right)=0$, that is, $c^{2}+a^{2}-c-a+1=k c a$, or $c a \mid c^{2}+a^{2}-c-a+1$. However, $c+b<a+b$, which contradicts the choice of $a$ and $b$. Therefore, there do not exist integers $a$ and $b$ greater than 1 for which the problem's condition holds.

Remark. The problem and the method of solution - the so-called infinite descent, first used by Fermat - are closely related to the 6th problem of the 29th International Mathematical Olympiad (see KöMaL 1988/7, p. 298).