You are on page 1of 8

American Mathematical Monthly Problem 11391 by Marian Tetiva,

Brlad, Romania.
Let p be a prime number, and s a positive integer. Let k be an integer, and let n be
an integer such that n k p
s
p
s1
. For every i {1, 2, ..., n} , let x
i
be an integer.
Assume that (p, s, k) = (2, 2, 2) and (s, k) = (1, p 1) . Prove that
k

j=0
(1)
j

n k +j
j

T {1, 2, ..., n} | |T| = k j and

tT
x
t
0 mod p

0 mod p
s
and
k

j=0
(1)
j

n k +j
j

T {1, 2, ..., n} | |T| = k j and

tT
x
t
0 mod p

0 mod p
s
.
Solution by Darij Grinberg.
We are going to show a bit more than the problem asks us to:
Theorem 0. Let p be a prime number, and s a positive integer. Let k be
an integer, and let n be an integer such that n k p
s
p
s1
. For every
i {1, 2, ..., n} , let x
i
be an integer. Let c Z.
Assume that (p, s, k) = (2, 2, 2) and (s, k) = (1, p 1) . Then,
k

j=0
(1)
j

n k +j
j

T {1, 2, ..., n} | |T| = k j and

tT
x
t
c mod p

0 mod p
s
(11391.1)
and
k

j=0
(1)
j

n k +j
j

T {1, 2, ..., n} | |T| = k j and

tT
x
t
c mod p

0 mod p
s
.
(11391.2)
For c = 0, this Theorem 0 yields the statement of the problem.
Our proof of Theorem 0 starts with a (very useful) algebraic fact:
Theorem 1. Let S be a nite set. Let R be a commutative ring with 1.
For every i S, let a
i
be an element of R. Let u be a nonnegative integer
such that u |S| . Then,

TS
(1)
|T|

tT
a
t

u
=

0, if u < |S| ;
(1)
|S|
|S|!

iS
a
i
, if u = |S|
.
1
Proof of Theorem 1. We will prove Theorem 1 by induction over |S| . The induction
base - the case |S| = 0 - is very easy and left to the reader. Now we come to the
induction step. That is, we have to show Theorem 1 for some nite nonempty set S,
assuming that it holds for every set smaller than S in place of S.
Let be an element of S. Then, |S \ {}| = |S| 1. Now,

TS
(1)
|T|

tT
a
t

u
=

TS
such that
T
(1)
|T|

tT
a
t

u
+

TS\{}
(1)
|T|

tT
a
t

u
(since every subset T of S either contains or is a subset of S \ {})
=

TS
such that
T
(1)
|T\{}|+1

tT\{}
a
t

u
+

TS\{}
(1)
|T|

tT
a
t

u
=

S\{}
(1)
|T

|+1

tT

a
t

u
+

TS\{}
(1)
|T|

tT
a
t

u
(here we substituted T

= T \ {} for T in the rst sum)


=

TS\{}
(1)
|T|+1

tT
a
t

u
+

TS\{}
(1)
|T|

tT
a
t

u
(here we renamed T

into T in the rst sum)


=

TS\{}
(1)
|T|

tT
a
t

tT
a
t

TS\{}
(1)
|T|

tT
a
t

tT
a
t

TS\{}
(1)
|T|
u

m=1

u
m

a
m

tT
a
t

um

since the binomial theorem yields

tT
a
t

u
=
u

m=0

u
m

a
m

tT
a
t

um
=
u

m=1

u
m

a
m

tT
a
t

um
+

tT
a
t

=
u

m=1

u
m

a
m

TS\{}
(1)
|T|

tT
a
t

um
. (11391.3)
But our induction assumption states that Theorem 1 holds for any set smaller than S
in lieu of S; thus, in particular, it holds for S \ {} , so we obtain

TS\{}
(1)
|T|

tT
a
t

um
=

0, if u m < |S \ {}| ;
(1)
|S\{}|
|S \ {}|!

iS\{}
a
i
, if u m = |S \ {}|
2
for every m {1, 2, ..., u} . Since |S \ {}| = |S| 1, this becomes

TS\{}
(1)
|T|

tT
a
t

um
=

0, if u m < |S| 1;
(1)
|S|1
(|S| 1)!

iS\{}
a
i
, if u m = |S| 1
.
Hence, (11391.3) becomes

TS
(1)
|T|

tT
a
t

u
=
u

m=1

u
m

a
m

0, if u m < |S| 1;
(1)
|S|1
(|S| 1)!

iS\{}
a
i
, if u m = |S| 1
. .. .
the only term of this sum that can be nonzero is the one for m=1
(since for m>1, the third factor is zero, because u|S| and m>1
yield um<|S|1)
=

u
1

....
=u
a
1

....
=a

0, if u 1 < |S| 1;
(1)
|S|1
(|S| 1)!

iS\{}
a
i
, if u 1 = |S| 1
= ua

0, if u < |S| ;
(1)
|S|1
(|S| 1)!

iS\{}
a
i
, if u = |S|
=

0, if u < |S| ;
ua

(1)
|S|1
(|S| 1)!

iS\{}
a
i
, if u = |S|
=

0, if u < |S| ;
|S| a

(1)
|S|1
(|S| 1)!

iS\{}
a
i
, if u = |S|
=

0, if u < |S| ;
(1)
|S|
|S|!

iS
a
i
, if u = |S|
This completes the induction step. Therefore, the induction proof of Theorem 1
is complete.
1
The next step is where we actually need the assumptions (p, s, k) = (2, 2, 2) and
(s, k) = (1, p 1) (and we even need one more, namely (p, s, k) = (2, 2, 3) ; we will
later get rid of this assumption):
Lemma 2. Let p be a prime number, and s a positive integer. Let k
be an integer such that k p
s
p
s1
. Assume that (p, s, k) = (2, 2, 2) ,
(p, s, k) = (2, 2, 3) and (s, k) = (1, p 1) . Then, k! 0 mod p
s
.
In order to prove this lemma, it is enough to nd two distinct integers in the set
{1, 2, ..., k} , one of which is divisible by p
s1
and the other one divisible by p (since
k! = 1 2 ... k will be then divisible by the product of these two integers, i. e., by
p
s1
p = p
s
). Of course, we can always choose p
s
p
s1
as the rst of these two integers;
the second one can be p
s
p
s1
p
s2
if s 3, or p
s1
if p 3, or 4 if p = s = 2. The
completely straightforward details are left to the reader.
Theorem 1 and Lemma 2 quickly yield:
1
For what it is worth, let me sketch the idea of a dierent proof of Theorem 1:
Fix S, and consider the a
s
for s S as variables. Then, the assertion of Theorem 1 is a polynomial
identity in these variables, so in order to prove it, is enough to verify it for the case when all a
s
are
nonnegative integers (since a polynomial identity holds if it only if it holds for nonnegative integers).
For every s S, let A
s
be a copy of the set {1, 2, ..., a
s
} such that the sets A
s
for dierent s S are
pairwisely disjoint. Now, how many mappings f : {1, 2, ..., u}

sS
A
s
satisfy f
1
(A
s
) = for every
s S ? Double counting (one time using the principle of inclusion and exclusion, the other time using
the box principle) leads to the identity of Theorem 1.
3
Corollary 3. Let p be a prime number, and s a positive integer. Let k
be an integer, and u a nonnegative integer such that u k, and let S be a
nite set such that |S| = k p
s
p
s1
. For every i S, let a
i
be an integer.
Assume that (p, s, k) = (2, 2, 2) , (p, s, k) = (2, 2, 3) and (s, k) = (1, p 1) .
Then,

TS
(1)
|T|

tT
a
t

u
0 mod p
s
.
Proof of Corollary 3. Notice that u k rewrites as u |S| . Lemma 2 yields
k! 0 mod p
s
. Now, Theorem 1 (applied to R = Z) yields

TS
(1)
|T|

tT
a
t

u
=

0, if u < |S| ;
(1)
|S|
|S|!
....
=k!0 modp
s

iS
a
i
, if u = |S|

0, if u < |S| ;
0, if u = |S|
= 0 mod p
s
,
and Corollary 3 is proven.
In the following part of the solution, we will use Knuths shorthand notation for
Boolean values: For any assertion U, we denote by [U] the Boolean value of the assertion
U (that is, [U] =

1, if U is true;
0, if U is false
).
It is then clear that if B is a set, if U (X) is an assertion for every subset X of B,
and if (X) is a number for every subset X of B, then

XB
[U (X)] (X) =

XB
such that
U(X) is true
(X) .
In particular, if B is a set, and U (X) is an assertion for every subset X of B, then

XB
[U (X)] = |{X B | U (X) is true}| .
Also, every assertion U satises [not U] = 1 [U] . For any two assertions U and V,
we have [U and V] = [U] [V] .
We come to another easy fact:
Lemma 4. Let p be a prime number; let s be a positive integer, and a an
integer. Then,
a
p
s
p
s1
[a 0 mod p] mod p
s
.
Proof of Lemma 4. It is easy to see that s p
s
p
s1
, so that a
s
| a
p
s
p
s1
. If
a 0 mod p, then a is coprime to p, so that a
p
s
p
s1
= a
(p)
1 mod p
s
(by Eulers
Totient Theorem) and [a 0 mod p] = 1, so that Lemma 4 is fullled. If a 0 mod p,
then a
p
s
p
s1
0 mod p
s
(since a 0 mod p yields p | a, thus p
s
| a
s
, what together
with a
s
| a
p
s
p
s1
yields p
s
| a
p
s
p
s1
) and [a 0 mod p] = 0, so that Lemma 4 is fullled
as well. Thus, Lemma 4 holds in both possible cases.
The following result is already very close to Theorem 0, which we desire to prove.
4
Corollary 5. Let p be a prime number, and s a positive integer. Let k
be an integer, and let S be a nite set such that |S| = k p
s
p
s1
. For
every i S, let a
i
be an integer. Let c Z. Assume that (p, s, k) = (2, 2, 2)
and (s, k) = (1, p 1) . Then,

TS
(1)
|T|

tT
a
t
c mod p

0 mod p
s
(11391.4)
and

TS
(1)
|T|

tT
a
t
c mod p

0 mod p
s
. (11391.5)
Proof of Corollary 5. For every T S, we have

tT
a
t
c

p
s
p
s1

tT
a
t
c 0 mod p

mod p
s
(by Lemma 4, applied to a =

tT
a
t
c). Hence,

TS
(1)
|T|

tT
a
t
c mod p

TS
(1)
|T|

tT
a
t
c 0 mod p

TS
(1)
|T|

tT
a
t
c

p
s
p
s1
=

TS
(1)
|T|
p
s
p
s1

u=0

p
s
p
s1
u

tT
a
t

u
(c)
p
s
p
s1
u
(by the binomial theorem)
=
p
s
p
s1

u=0

p
s
p
s1
u

(c)
p
s
p
s1
u

TS
(1)
|T|

tT
a
t

u
mod p
s
. (11391.6)
Now, we will verify the congruence

TS
(1)
|T|

tT
a
t

u
0 mod p
s
(11391.7)
for every u {0, 1, ..., p
s
p
s1
} . In fact, in the case (p, s, k) = (2, 2, 3) , Theorem 1
yields

TS
(1)
|T|

tT
a
t

u
=

0, if u < |S| ;
(1)
|S|
|S|!

iS
a
i
, if u = |S|
= 0
(since u p
s
p
s1
= 2
2
2
21
= 2 < 3 = k = |S|), so that (11391.7) is satised;
on the other hand, in the case (p, s, k) = (2, 2, 3) , the required congruence (11391.7)
directly follows from Corollary 3. Hence, (11391.7) is proven in both cases. Thus,
(11391.6) becomes

TS
(1)
|T|

tT
a
t
c mod p

=
p
s
p
s1

u=0

p
s
p
s1
u

(c)
p
s
p
s1
u

TS
(1)
|T|

tT
a
t

u
. .. .
0 modp
s
by (11391.7)
0 mod p
s
,
5
so that (11391.4) is proven.
Besides,

TS
(1)
|T|
=
|S|

k=0
(1)
k
|{T S | |T| = k}| =
|S|

k=0
(1)
k

|S|
k

= 0 (11391.8)
(since |S| > 0), so that

TS
(1)
|T|

tT
a
t
c mod p

TS
(1)
|T|

not

tT
a
t
c mod p

TS
(1)
|T|

tT
a
t
c mod p

TS
(1)
|T|
. .. .
=0 by (11391.8)

TS
(1)
|T|

tT
a
t
c mod p

. .. .
0 modp
s
by (11391.4)
0 0 = 0 mod p
s
,
and thus (11391.5) is established. This completes the proof of Corollary 5.
Now we are prepared to solve the problem:
k

j=0
(1)
j

n k +j
j

T {1, 2, ..., n} | |T| = k j and

tT
x
t
c mod p

=
k

j=0
(1)
j

n k +j
j


T{1,2,...,n}

|T| = k j and

tT
x
t
c mod p

. .. .
=[|T|=kj]
"
P
tT
xtc mod p
#
=

T{1,2,...,n}

tT
x
t
c mod p

j=0
(1)
j

n k +j
j

[|T| = k j]
=

T{1,2,...,n}

tT
x
t
c mod p

j=0
(1)
kj

n j
k j

[|T| = j]
(here we substituted k j for j in the second sum)
=

T{1,2,...,n}

tT
x
t
c mod p

j=0
(1)
kj

n j
k j

[|T| = j]
. .. .
=(1)
k|T|

n |T|
k |T|

, since |T|{0,1,...,n}

here we replaced the


k

j=0
sign by an
n

j=0
sign, since all addends for j > k are zero
(as k j < 0 and therefore

n j
k j

= 0 for j > k)

6
=

T{1,2,...,n}

tT
x
t
c mod p

(1)
k|T|
. .. .
=(1)
k
(1)
|T|

n |T|
k |T|

= (1)
k

T{1,2,...,n}
(1)
|T|

tT
x
t
c mod p

n |T|
k |T|

= (1)
k

T{1,2,...,n}
(1)
|T|

tT
x
t
c mod p

|{S {1, 2, ..., n} | |S| = k and T S}|

since

n |T|
k |T|

= |{S {1, 2, ..., n} | |S| = k and T S}|

= (1)
k

T{1,2,...,n}
(1)
|T|

tT
x
t
c mod p


S{1,2,...,n}
[|S| = k and T S]
. .. .
=[|S|=k][TS]
= (1)
k

S{1,2,...,n}
[|S| = k]

T{1,2,...,n}
[T S] (1)
|T|

tT
x
t
c mod p

. .. .
=
P
T{1,2,...,n}
such that
TS
(1)
|T|
"
P
tT
xtc mod p
#
= (1)
k

S{1,2,...,n}
[|S| = k]

T{1,2,...,n}
such that
TS
(1)
|T|

tT
x
t
c mod p

= (1)
k

S{1,2,...,n}
[|S| = k]

TS
(1)
|T|

tT
x
t
c mod p

. .. .
=
P
S{1,2,...,n}
such that |S|=k
P
TS
(1)
|T|
"
P
tT
xtc mod p
#
= (1)
k

S{1,2,...,n}
such that |S|=k

TS
(1)
|T|

tT
x
t
c mod p

. .. .
0 modp
s
by (11391.5), applied to at=xt
(1)
k

S{1,2,...,n}
such that |S|=k
0 = 0 mod p
s
.
Thus, we have proven
k

j=0
(1)
j

n k +j
j

T {1, 2, ..., n} | |T| = k j and

tT
x
t
c mod p

0 mod p
s
.
The same argument, with c mod p replaced by c mod p and with (11391.5) replaced
by (11391.4), yields
k

j=0
(1)
j

n k +j
j

T {1, 2, ..., n} | |T| = k j and

tT
x
t
c mod p

0 mod p
s
.
7
Thus, the problem is solved.
Remark. Note that a weaker version of Corollary 5 (namely, a version requiring
k p
s
) was discussed in
http://www.mathlinks.ro/Forum/viewtopic.php?t=188350 .
8

You might also like