i=1
__
2i
2
p
_
−2
_
i
2
p
__
=
p −1
2
.
Problem 1.0.5 (PEN J11). (a) Saint-Peterburg, 1998 Let d(n) denote the number of positive
divisors of the number n. Prove that the sequence d(n
2
+1) does not become strictly monotonic
from some point onwards.
(b) Prove that d((n
2
+ 1)
2
) does not become monotonic from any given point onwards.
Problem 1.0.6 (PEN A3). (IMO 1988/6) Let a and b be positive integers such that ab+1 divides
a
2
+b
2
. Show that
a
2
+b
2
ab + 1
(1.1)
is the square of an integer.
Problem 1.0.7 (PEN D2). (Putnam 1991/B4) Suppose that p is an odd prime. Prove that
p

k=0
_
n
k
__
n +k
k
_
. (2.98)
Equating the coeﬃcients x
n
[f(x)], we get the desired result.
Now, we go back to the original problem. We take n = p in Lemma 12 and use the fact that
_
p
k
_
is divisible by p(established in the previous oﬀered solution), where k ∈ ¦1, , p−1¦. We obtain
p

j=0
_
p
j
__
p +j
j
_
≡ 1 +
p−1

j=1
_
p
j
_
2
2
j
+ 2
p
≡ 1 + 2
p
(mod p
2
). (2.99)
Problems in Elementary Number Theory 1(2008) No. 1
Project PEN http://projectpen.wordpress.com
2.8 An arithmetic partition
8
PEN O35
(Romania TST 1998) Let n be a prime and a
1
< a
2
< . . . < a
n
be integers. Prove
that a
1
, a
2
, . . . , a
n
is an arithmetic progression if and only if there exists a partition
of N
0
= ¦0, 1, 2, . . . , ¦ into n sets A
1
, A
2
, . . . , A
n
so that
a
1
+A
1
= a
2
+A
2
= . . . = a
n
+A
n
, (2.100)
where x +A = ¦x +a[a ∈ A¦.
Vasile Pop
First Solution. Assume ﬁrstly that a
1
, a
2
, . . . , a
n
is an arithmetic progression. Deﬁne A
i
= ¦knr+
ir +j[k ∈ N
0
, 0 ≤ j ≤ n−1¦. It is easy to see that N
0
= A
1
∪A
2
. . . ∪A
n
and A
i
∩A
j
= ∅ for i ,= j.
The converse part is much more diﬃcult. For convenience of notations, let B
i
= A
n−i
and
r
i
= a
n
−a
n−i
. Hence B
i
= B
0
+ r
i
and N
0
= B
0
∪ B
1
∪ . . . ∪ B
n−1
. Call a segment of length k
of a subset B
i
a set S ⊂ B
i
of the form ¦m+ 1, . . . , m+k¦, where m, m+k + 1 ,∈ B
i
.
Lemma 2.8.1. Any segment of any subset B
i
has length r = r
1
.
Proof. Note that if B
i
for some i > 0 contains a segment of length diﬀerent from r, then so must
B
0
, since B
i
= B
0
+ r
i
. Hence it is enough to show that B
0
consists only of segments of length
r. Indeed, note that if m ∈ B
0
then m + r ∈ B
1
, hence any segment of B
0
has length at most
r. Assume to the contrary that there is at least one segment of length less than r in B
0
. Among
all such segments, let S = ¦m + 1, . . . , m + k¦ ⊂ B
0
with k < r be the one with smallest m (the
’ﬁrst’ one). Then ¦m+1 +r, m+2 +r, . . . , m+k +r¦ is a segment of B
1
. Since m+k +1 ,∈ B
0
,
m + r ,∈ B
1
, and the set ¦m + k + 1, . . . , m + r¦ has r − k > 0 elements it follows that there
is a segment T ⊂ ¦m + k + 1, . . . , m + r¦ of some B
i
, i > 0 of length at most r − k. Hence
T − r
i
= ¦m + k + 1 − r
i
, . . . , m + r − r
i
¦ is a segment of length at most r − k < r of B
0
. Since
m+k + 1 −r
i
< m, this contradicts the deﬁnition of S.
Lemma 2.8.2. Each B
i
starts with the segment S
i
= ¦ir, ir + 1, . . . , ir +r −1¦.
Proof. We prove the statement by induction on i. It is clear that S
0
= ¦0, 1, . . . , r − 1¦ ⊂ B
0
,
which is the base of our induction. Assume the statement true for 0 ≤ i < k. We are going to
show the statement for i = k.
So S
i
⊂ B
i
, i = 0, k −1. Let S
k
⊂ B
j
and assume, to the contrary, that j ,= k. From
a
1
< a
2
< . . . < a
n
we get r
1
< r
2
< . . . < r
n
. This implies j < k. But then S
k
is already
the second segment of B
j
(after S
j
) which is impossible for j > 0, since we haven’t reached the
second segment of B
0
yet. Hence j = 0, and so S
k
∈ B
0
. Note that for j < k we have r
j
= jr.
Then it follows that S
i
⊂ B
i−k
for i = k, k + 1, . . . , 2k − 1. Again, S
2k
must be a subset of
either B
0
or B
k
. If S
2k
⊂ B
0
then we apply the above argument again to obtain S
i
∈ B
i−2k
for
i = 2k, 2k +1, . . . , 3k −1. Repeating this process, we obtain that the ﬁrst segment of B
k
must be
Problems in Elementary Number Theory 1(2008) No. 1
Project PEN http://projectpen.wordpress.com
of the form S
tk
, for some t. This implies r
k
= tk.
Let’s prove now by induction on l, that if lk < n then each apparition of a segment from B
lk
is followed by a sequence of segments belonging to the sets B
lk+1
, . . . , B
lk+−1
, implying that
(l + 1)k ≤ n. Moreover, if (l + 1)k ≤ n then the ﬁrst segment of B
(l+1)k
is of the form S
tk
for
some t.
For l = 0 the statement of trivial. Assume now the statement true for all l < u and let’s prove it
for l = u. Assume lk < n. Applying the inductive hypothesis for l = u − 1, we get that the ﬁrst
segment of B
(u+1)k
= B
lk
is of the form S
tk
for some t. Take the segment S
tk+i
, 0 < i < k. Let’s
prove that it belongs to a new segment B
lk+i
. Indeed assume S
tk+i
∈ B
j
for some j. Assume
B
j
has appeared before. The inductive hypothesis shows that each B
xk+i
, x < l, 0 ≤ i < k has
only segments of the form S
x

makes sense. We’ll
now prove in a completely similar way as above that if km ∈ X for some k, then km + r ∈ X,
for 0 < r < m; and conversely, if km + r ∈ X for some 0 < r < m, then km ∈ X. Among all
such bad pairs, take the one with the least k. For the sake of completeness we shall now treat
the second case. Assume that km + r ∈ X for some 0 < r < m and that km / ∈ X. It is easy
to see that km / ∈ Y , otherwise km + r = (km + r) + 0. Hence there is a positive x so that
xm ∈ Y and (k −x)m ∈ X. By the choice of our k, we obtain that (k −x)m +r ∈ X. But then
(km + r) + 0 = [(k − x)m + r] + xm are two distinct representations. Contradiction. So we can
write X = mX

is unique.
Note that Lemma 2.8.3 is symmetrical with respect to X and Y .
Let’s now ﬁnish the problem. We will prove by induction on [B[ that if B ∪ R = ¦0, 1, . . . , [B[
[R[ − 1¦ then 0, r
1
, . . . , r
n−1
form an arithmetic progression. If [B[ = 1, then B = ¦0¦ and
B +R = B = ¦0, 1, . . . , n −1¦ so r
i
= i and we are done. Assume now the statement true for all
sets B having less than b elements. We have two cases:
If 1 ∈ R, then m = min(B ¸ ¦0¦) > 1 and from Lemma 3, m[n. Since n is a prime number,
it follows that m = n. Then it follows that [R