JP Journal of Algebra, Number Theory and Applications Volume 12, Number 1, 2008, Pages 41-48 Published Online: November 11, 2008 This paper is available online at http://www.pphmj.com © 2008 Pushpa Publishing House
COMPOSITIONS VERSUS CYCLIC COMPOSITIONS RODRIGO A. PÉREZ Department of Mathematical Sciences IUPUI, 402 N. Blackford St. Indianapolis, IN 46202, U. S. A. e-mail:
[email protected] Abstract We prove that the sum of greatest common divisors of parts in all compositions of n equals the sum of lengths of all cyclic compositions of n. The proof highlights structural similarities between the set of compositions of n and the set of cyclic compositions of n.
1. Definitions and Statement A composition of the positive integer n is an ordered partition of n; that is, a vector λ = ( p1 , ..., pr ) of positive integers pi , called parts, that add up to n. A cyclic composition of n is a composition λ considered only up to a cyclic permutation of its parts (see [4, p. 268]). One can visualize a cyclic composition as a string of numbers arranged clockwise around a circle. Thus, the compositions (2, 1, 1), (1, 2, 1), (1, 1, 2) are all different, but stand for the same cyclic composition of 4, while the compositions
(3, 2, 1) and (3, 1, 2) represent two different cyclic compositions of 6. Notation. By convention we represent a cyclic composition by writing the highest composition in its equivalence class using the lexicographical order. Let C (n ) and CC (n ) denote the set of compositions of n and the set 2000 Mathematics Subject Classification: 11P81. Keywords and phrases: compositions, cyclic compositions. Research supported by an NSF Postdoctoral Fellowship in the Mathematical Sciences, grant DMS-0202519, and by NSF research grant DMS-0701557. Received May 15, 2008
RODRIGO A. PÉREZ
42
of cyclic compositions of n, respectively. For a (cyclic) composition λ, define gcd(λ ) as the greatest common divisor of all the parts in λ, and r(λ ) as the total number of parts in λ; i.e., the length of λ.
For n = 1, ..., 6, the sum
∑λ∈CC (n ) r(λ )
returns the values 1, 3, 6, 12,
20, 42. A search in the OEIS [3] returns sequence A034738, the Dirichlet convolution of 2n −1 with Euler’s totient function ϕ(n ):
∑2
n −1
⋅ ϕ(n d ).
(1)
d|n
The OEIS entry includes a claim to the effect that this sequence equals the sum of greatest common divisors of parts in all compositions of n, but the author of that comment confirmed in an email [2] that such identity “probably is not published anywhere”. We will prove more: Theorem 1. For all n ≥ 1,
∑( ) gcd(λ) = ∑ 2
λ∈C n
n −1
⋅ ϕ(n d ) =
d|n
∑
r (λ ).
(2)
λ∈CC (n )
The connection between greatest common divisors of compositions and lengths of cyclic compositions is initially surprising. The underlying phenomenon is a structural similarity between C (n ) and CC (n ) that will be highlighted in our proof. The auxiliary arrays C ( n ), CC ( n ) are intended to reflect the analogy between constructing new compositions by scalar multiplication (a composition transformation related to greatest common divisors) and by concatenation (related to lengths). 2. Preliminary Facts
The following four facts are completely elementary and well known. We state them here for ease of reference since they are used at various points in the proof of Theorem 1. Fact I. Every divisor d of n ≥ 1 has associated a symmetric divisor n d. It follows that for any function g : Z +
C,
COMPOSITIONS VERSUS CYCLIC COMPOSITIONS
43
∑ g (d ) = ∑ g (n d ).
d|n
d|n
This will be referred to as a change of divisor variable. Fact II. Let X := {d | d divides n} and consider two arbitrary functions f :S
X and F : S × X
C, where S is a finite set. The equality
F (λ , d ) ∑ F (λ, f (λ )) = d∑| n λ∑ ∈S
λ∈S
f (λ )= d
is straightforward; we will say that the left sum is split over the divisors of n. Fact III. As an easy application of Fact II, let S = {1, ..., n}, f ( ) = gcd( , n ), and F ( , d ) ≡ 1 for n =
∈ S and arbitrary d. We obtain
∑
1 =
∈{1, ..., n}
∑ ∑
1.
d | n ∈{1, ..., n} gcd ( , n )= d
But gcd( , n ) = d if and only if gcd( d, n d ) = 1. Thus, the right-most sum above counts the number of integers
d between 1 and n d that
are relatively prime with n d; i.e., it equals ϕ(n d ). After a change of divisor variable, we obtain the identity
∑ ϕ(d ) = n.
(3)
d|n
Fact IV. The total number of compositions of n is C (n ) = 2n −1.
(4)
Proof. Placing either a plus sign or a comma in each of the n − 1
boxes of the array n
( 1 , 1 , ... , 1 , 1 ) produces a unique composition of n. Conversely, every composition determines an assignment of pluses and commas. Since there are n − 1 binary choices, the result follows.
RODRIGO A. PÉREZ
44
3. Proof of the Theorem Further notation. For k ∈ Z + , the notation kλ stands for the
composition (kp1 , ..., kpr ), while λk represents a concatenation of k consecutive copies of λ. Similarly, if d | gcd(λ ), then
1 λ denotes the d
p p composition 1 , ..., r . d d
The primitive sub-composition of λ, written λ ′, is the shortest composition µ such that µ k = λ; the primitive length of λ is r ′ := r (λ ′). Furthermore, we define the multiplicity m(λ ) := r (λ ) r ′(λ ), and let n′ stand for the integer such that λ ′ ∈ C (n′). Thus, for instance, the composition
λ = (1, 2, 3, 1, 2, 3)
has primitive length
r′ = 3
and
multiplicity m(λ ) = 2 since λ ′ = (1, 2, 3). Notice that for any λ we have m(λ ) = n n′ and (λ ′)m(λ ) = λ. Definition. For any n the sets C ( n ) :=
∪ C(d ),
CC ( n ) :=
d|n
∪ CC ( d )
d|n
are called the composition array and cyclic composition array, respectively. We will represent C ( n ) so that each column consists of the elements of one set C (d ) in descending lexicographical order, and so that the row headed by λ ∈ C (n ) contains all
1 λ for d | gcd(λ ) in increasing d
order. Similarly, we represent CC ( n ) so that each column consists of the elements of one set CC (d ), and so that the row headed by λ = (λ ′)m includes all (λ ′)(m d ) for d | m in increasing order. As an example, consider Figure 1.
COMPOSITIONS VERSUS CYCLIC COMPOSITIONS
45
Figure 1. The arrays C ( 4 ) (left) and CC ( 6 ) (right).
We will prove the following string of identities that establish Theorem 1: gcd ( λ ) = ∑ ∑ C n (a)
λ∈ ( )
(b)
ϕ( gcd ( λ ) ) =
=
∑
−1
⋅ ϕ( n d )
|
λ∈C ( n )
(c)
2n ∑ d n (d)
r ′ ( λ ) ⋅ ϕ ( m( λ ) ) =
∑
r (λ ).
λ∈CC ( n )
λ∈CC ( n )
The proofs of (a) and (d) are similar and will be presented first. The proofs of (b) and (c) are also similar, but the later requires an extra idea to exploit Fact IV while working with cyclic compositions. Proof of (a). Each row of C ( n ) consists of a composition λ ∈ C (n )
followed by all the compositions
∑
λ∈C ( n )
using Fact III.
ϕ( gcd ( λ ) ) =
1 λ ∈ C (n d ) with d | gcd(λ ), so d
∑ ∑
λ∈C ( n ) d | gcd ( λ )
ϕ( d ) =
∑
λ∈C ( n )
gcd ( λ ),
RODRIGO A. PÉREZ
46
Proof of (d). Each row of CC ( n ) consists of a cyclic composition λ ∈ CC (n ) followed by all cyclic compositions µ ∈ CC (n d ) such that µ d = λ for some d. Note that d must be a divisor of the multiplicity m(λ ), and that the primitive length r ′(µ ) is the same for any cyclic
composition in the same row. Therefore, splitting by rows and using Fact III, we obtain
∑
r ′( λ ) ⋅ ϕ( m( λ ) ) =
λ∈CC ( n )
r ′( λ ) ⋅ ∑ ∑ CC n d m
λ∈
=
( )
|
ϕ( d )
(λ)
r ′( λ ) ⋅ m( λ ) = ∑ r ( λ ) ∑ λ∈ n λ∈ n CC ( )
CC ( )
by the definition of m(λ ). Proof of (b). Splitting over divisors of n,
∑
ϕ( gcd ( λ ) ) =
λ∈C ( n )
∑ ∑
d|n
ϕ( d ).
λ∈C ( n ) gcd ( λ ) = d
If λ ∈ C ( n ) has gcd(λ ) = d, dividing every term by d gives a composition 1 1 λ ∈ C ( n d ) with gcd λ = 1. Clearly, this relationship is bijective, so d d the last sum becomes
∑ ∑
ϕ( d ) =
d | n λ∈C ( n d ) gcd ( λ ) =1
∑ ∑
ϕ( n d ),
d | n λ∈C ( d ) gcd ( λ ) =1
after a change of divisor variable. Note that every row of C ( d ) has a unique composition with gcd equal to 1, and is headed by a composition in C (d ). It follows that the set {λ ∈ C ( d ) | gcd ( λ ) = 1} is in 1 to 1 correspondence with C (d ). Since the quantity ϕ(n d ) is independent of λ, ⋅ϕ n d = 1 ) ( d | n λ∈C ( d ) gcd λ =1 ( )
∑ ∑
using Fact IV.
∑
d|n
C ( d ) ⋅ ϕ( n d ) =
∑2
n −1
d|n
⋅ ϕ( n d ),
COMPOSITIONS VERSUS CYCLIC COMPOSITIONS
47
Proof of (c). Splitting over divisors of n,
∑
r ′( λ ) ⋅ ϕ( m( λ ) ) =
λ∈CC ( n )
∑ ∑
r ′( λ ) ⋅ ϕ( d );
d | n λ∈CC ( n ) m( λ ) =d
or, changing the divisor variable, =
∑ ∑
r ′( λ ) ⋅ ϕ( n d ) .
(5)
d | n λ∈CC ( n ) m( λ ) = n d
For a fixed divisor d of n we give now a bijection between cyclic ~ compositions λ ∈ CC ( n ) with m(λ ) = n d, and cyclic compositions λ ∈ CC (d ) as follows: Restrict attention to the row of CC ( n ) containing λ; it
consists of compositions obtained by repeated concatenation of λ ′. The largest one, Λ, satisfies Λ ∈ CC (n ) with multiplicity m(Λ ) = n n′. By the array structure of CC ( n ), we have m(λ ) | m(Λ ), so that
n n d = is an ′ n d n′
d ~ integer. Define the composition λ := λ ′. Since the sum of a composition n′ d ~ is the multiplicity times n′, we get that λ ∈ CC n′ = CC (d ); notice n′ ~ ~ that λ lies in the same row of CC ( n ) as λ. Conversely, if λ ∈ CC (d ), then
it is an element of CC ( n ), so there is a unique cyclic composition λ in the same row and with m(λ ) = n d. It follows that the sum in (5) is equal to
∑ ∑
d|n ~ λ∈CC (d )
~ r ′(λ ) ⋅ ϕ(n d )
since r ′ is the same for all compositions on a given row of CC ( n ). Finally, consider the term
∑ ~
~ ~ r ′(λ ). Each cyclic composition λ ∈
λ∈CC (d )
~ CC (d ) gives rise to exactly r ′(λ ) compositions in C (d ); namely those that ~ arise from permuting λ cyclically through a full primitive length. Thus,
the sum in question counts the total number of compositions of d, and we
RODRIGO A. PÉREZ
48 obtain =
~ ′ ( ) r λ C (d ) ⋅ ϕ(n d ) = 2n −1 ⋅ ϕ(n d ). ⋅ ϕ(n d ) = ~ d | n λ∈CC (d ) d|n d|n
∑ ∑
∑
∑
,
Note. The proofs of (a) and (b) work almost without modification to show that
∑ gcd(λ) = ∑
λ∈S
S ⋅ ϕ(n d ),
d|n
where S may stand for the set of cyclic compositions of n, or the set of partitions of n, etc. In the later case, one obtains OEIS sequence A078392; in the case of cyclic compositions, the new sequence 1, 3, 5, 9, 11, 22, 25, …. References [1]
George E. Andrews, The Theory of Partitions, Cambridge Mathematical Library, Cambridge University Press, Cambridge, 1998.
[2] [3]
V. Jovović, Personal communication. N. J. A. Sloane, (2007), The On-Line Encyclopedia of Integer Sequences, published electronically at www.research.att.com/~njas/sequences/.
[4]
D. M. Y. Sommerville, On certain periodic properties of cyclic compositions of numbers, Proc. London Math. Soc. s2-7(1) (1909), 263-313.
g