Brilli the ant placed the numbers 1 , 2 , … , n in order clockwise around a circle. She can create an infinite sequence A = { a j } j = 0 ∞ of integers by letting a 0 = k ∈ { 1 , 2 , … , n } and constructing a i + 1 from a i by taking the integer that is a i positions clockwise in the circle from a i . For a set of sequences S = { A 0 , A 1 , … , A m } , we say that S covers the circle if each number on the circle occurs an infinite number of times in the sequences of S .
We define the Circle Cover Number of n to be the minimum size of a set S that covers the circle with entries { 1 , 2 , … , n } . Determine how many integers from 1 to 1 0 0 have Circle Cover Number equal to 2 .
Details and assumptions
It is possible for the Circle Cover Number of n to be infinite, if there is no finite set S which covers the circle.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
This solution is essentially the same as the intended one, but written a bit more concisely. Note that checking that 2 is primitive modulo a small prime, like p = 6 7 , is not too hard for three reasons. Multiplication by 2 modulo a small prime is easy to do by hand, the order of 2 has to divide p − 1 , and 2 is a quadratic non-residue. For instance, for p = 6 7 the order of 2 can be 1 , 2 , 3 , 6 , 1 1 , 2 2 , 3 3 , 6 6 . Because 2 is a quadratic non-residue, the order can only be 2 , 6 , 2 2 , 6 6 . We just need to check that 2 1 1 is not − 1 ( m o d 6 7 ) to guarantee that the order of 2 is not 2 2 .
Relabel the points with 0, 1, ..., n-1. After relabelling, at each point a i , the next is obtained via a i + 1 ≡ 2 a i + 1 ( m o d n ) which gives
a i + 1 + 1 ≡ 2 ( a i + 1 ) ( m o d n ) ⟹ a k + 1 ≡ 2 k ( a 0 + 1 ) ( m o d n ) .
Letting b k = a k + 1 ( m o d n ) for k=0, ..., we have
b k ≡ 2 k b 0 ( m o d n ) .
Suppose the Circle Cover Number of n is 2 and n>2.
Thus, there are two sequences b k ≡ 2 k b 0 ( m o d n ) and c k ≡ 2 k c 0 ( m o d n ) such that each of i = 0, ..., n-1 occurs infinitely many times in one of the sequences.
If b k = 0 for some k, then b k + 1 = b k + 2 = … = 0 so the remaining points only occur finitely many times in this sequence. Thus, the remaining points 1, ..., n-1 must occur infinitely many times in the other sequence ( c k ) , i.e. the powers of 2 run through all 1, 2, ..., n-1. If n is composite, this is impossible since if prime p divides n, by the time c k = p ( m o d n ) all the subsequent terms c k + 1 , c k + 2 , … are divisible by p, which means the values which are not divisible by p only occur finitely many times.
Thus n=p is prime and powers of 2 run through all {1, 2, ..., p-1} mod p. Hence, we wish to look for all primes p such that 2 is a generator (or primitive root) modulo p. We can test this one at a time for all p<100, but the process can be sped up by observing that if 2 is a square mod p, then 2 ( p − 1 ) / 2 ≡ 1 ( m o d p ) so 2 is not a generator mod p. Hence, we only need to look at primes p ≡ 3 , 5 ( m o d 8 ) . Out of these, only 43 fails. Hence, p = 3, 5, 11, 13, 19, 29, 37, 53, 59, 61, 67, 83. Together with n=1 (note: n=2 is not a solution), we have 13 values of n.
Oh dear. My mistake was actually to include n=1, which has CCN = 1. That's why I got 13 instead of 12.
That was embarassing. >_<
Why do you just look at primes p such that p ≡ 3 , 5 ( m o d 8 ) ? How does that make sure that 2 is not a square ( m o d p ) ?
Log in to reply
It's known that for an odd prime p, 2 is a square mod p if and only if p ≡ ± 1 ( m o d 8 ) .
Log in to reply
More importantly (another implicit step that was not mentioned) is that 2 is a quadratic residue mod p if and only if 2 ( p − 1 ) / 2 ≡ 1 ( m o d p ) which is why we are invoking the quadratic reciprocity in the first place.
Could you explain why that is true, or link me to a proof?
Log in to reply
@Tim Vermeulen – That's part of what is known as quadratic reciprocity, proved by Gauss. Lemma 1 (Euler's Criterion): 2 is a square mod odd prime p iff 2 ( p − 1 ) / 2 = 1 m o d p since Z / p × is cyclic. This is used to prove Lemma 2 (Gauss's Lemma): 2 is a square mod odd prime p iff there are evenly many numbers greater than (p-1)/2 in { 2 , 4 , 6 , . . . . , p − 1 } by considering 2 × 4 × 6 . . . × p − 1 = 2 ( p − 1 ) / 2 ( ( p − 1 ) / 2 ) ! . You can check that if p is 8k+1, then there are 2k such numbers, which is even, so 2 is a quadratic residue mod a prime which is 1 mod 8, etc.
Quadratic reciprocity is one of the landmark results in elementary number theory.
I just put in the answer as 440 (sum of all the 12 primes) after an hour's work on this problem instead of the number of primes because i thought that's what the question asked and then looked up the solution out of frustration... Now I know what real frustration is... :P
I checked that 4 1 is not a solution either. I think that is why you got 1 3 solutions instead of 1 2 . Please correct me if I am wrong.
It is clear that we have 2 a i ≡ a i + 1 ( m o d n ) . Thus it follows that a sequence A is in fact { k , 2 k , 4 k , . . . } except with its values taken modulo n .
Now, suppose n has circle cover 2 . Clearly n must occur infinitely many times in one of the sequences. But once that sequence has hit n as a value of some a i , it stays at n forever. Thus 1 , 2 , . . . , n − 1 only occur finitely many times in that sequence. Therefore it follows that the other sequence achieves all of the values 1 , 2 , . . . , n − 1 infinitely many times. This implies that ord n ( 2 ) = n − 1 (if it were less, the sequence would begin to repeat before reaching all n − 1 numbers) and therefore n is a prime for which 2 is a primitive root. As 2 is a primitive root, it is a quadratic nonresidue and thus n ≡ 3 , 5 ( m o d 8 ) . Then by checking the primes under 1 0 0 which are 3 or 5 modulo 8 we find that 2 is a primitive root for n = 3 , 5 , 1 1 , 1 3 , 1 9 , 2 9 , 3 7 , 5 3 , 5 9 , 6 1 , 6 7 , 8 3 , implying the answer is 1 2 .
Firstly note that the circle cover number of 1 is 1. Also, note that a i + 1 ≡ 2 a i ( m o d n ) .
Assume that the circle cover number of n is 2; we shall find out some properties that n must have.
If n is even then note that for every sequence { a j } j = 0 ∞ , every term (except possibly the first term) is even. Hence every set S of sequences contains only a finite number of odd numbers, so S cannot cover the circle. Thus n is odd and greater than 1.
Note that a i ≡ 2 i a 0 ≡ 0 ( m o d n ) if and only if a 0 ≡ 0 ( m o d n ) . Hence if a 0 = n then the sequence cannot contain the number n . Also, if a 0 = n then clearly the sequence only contains the number n . Hence the numbers 1 and n cannot appear in the same sequence, and thus the circle cover number of n is at least 2.
Furthermore, a i ≡ 2 i a 0 ( m o d n ) , so a i is coprime to n if and only if a 0 is coprime to n (because n is odd). Thus if n has a prime factor p < n , then the numbers 1 and p cannot appear in the same sequence, and the numbers p and n cannot appear in the same sequence. This means that the circle cover number of n is at least 3, contradiction. Thus n is an odd prime.
We know that a set of two sequences covers the circle for n . From the above discussion we know that one of these sequences must be the constant sequence ( n , n , n , … ) . Hence the other sequence (call it B = { b j } j = 0 ∞ ) must contain all the numbers from 1 to n − 1 .
Let d be the smallest positive integer solution to 2 k ≡ 1 ( m o d n ) . Note that d must exist and satisfies d ≤ n − 1 , because 2 n − 1 ≡ 1 ( m o d n ) by Fermat's Little Theorem. In fact, let l be any other solution to 2 k ≡ 1 ( m o d n ) , and let r be the remainder when l is divided by d ; then 0 ≤ r < d . Write l = q d + r with some integer q ; then 2 r ≡ 2 l ( 2 d ) − q ≡ 1 ( m o d n ) This contradicts the minimality of d if r is a positive integer. Thus r = 0 , and so d ∣ l . In particular, d ∣ n − 1 .
(Note: d is known as the (multiplicative) order of 2 (mod n ).)
Now 2 d ≡ 1 ( m o d n ) implies b k + d ≡ 2 d b k ≡ b k ( m o d n ) implies b k + d = b k for all k , so B is periodic with period d . But B contains all numbers from 1 to n − 1 , so d ≥ n − 1 . Therefore d = n − 1 .
Conversely, if d = n − 1 then the sequence B has minimal period n − 1 , so it contains n − 1 distinct terms before repeating, so the circle cover number of n is 2. Hence the circle cover number of n is 2 if and only if d = n − 1 .
In particular, d = n − 1 implies d ∤ 2 n − 1 , so 2 2 n − 1 ≡ 1 ( m o d n ) . This happens if and only if n ≡ 3 , 5 ( m o d 8 ) by a special case of the Quadratic Reciprocity Theorem.
This leaves us with 13 possible values of n : 3, 5, 11, 13, 19, 29, 37, 43, 53, 59, 61, 67, 83. But how do we know for which of these values does d = n − 1 hold? For example, when n = 2 9 , how do we check if d = 2 8 ?
Well, we do know in this case that d ∣ 2 8 . Also, since 2 2 n − 1 ≡ 1 ( m o d n ) we have d ∤ 1 4 . From this we deduce that 2 must divide exactly twice into d , i.e. 2 2 ∣ d and 2 3 ∤ d , so either d = 4 or d = 2 8 . The first case cannot hold since 2 4 ≡ 1 ( m o d 2 9 ) , so d = 2 8 .
Checking similarly for the other 12 cases, we see that d = n − 1 for all these values of n except one (when n = 4 3 , d = 1 4 ). Hence there are 1 2 values of n from 1 to 100 with circle cover number equal to 2.
The problem is about make sequences in that way: a(i+1)=2ai(modn). If n is even (n=2k) we have that when ai=k a(i+1)=2k and then for every t>I at=n so we can't have any sequence with infinite numbers k's. So n is odd. But, with n odd don't exist k such that 2k=n(modn). Só or of the sequences A is n, n, n, n,... . The other sequence will have all the other numbers. So we can choose a0=1 and the sequence will be 2^k(modn) and he must have n-1 numbers. But orda(n) <=phi(n) <=n-1 where we have the equality if and only if n is prime and a is a primitive root modn. For the values of the problem we have that 2 is a primitive root for 12 values
For a fix n , consider a circle placed with number 1 , 2 , . . . , n around a circle clockwise.
Note that if we start from k < n , the next position traversed by k position will be p where p is in the complete residue system { 1 , 2 , . . . , n } and p = 2 k (since we will be travel around with period n ). So this sequence can be written as { p i } i = 0 ∞ where p i is in the complete residue system { 1 , 2 , . . . , n } and p i = 2 i k .
We can see that the next position of n will always be n for the rest of the sequence that contains n . So we can let A 0 = { n , n , n , . . . } be the sequence that covers n . In order to make Circle Cover Number of n to be 2, the numbers 1 , 2 , . . . , n − 1 must be covered in one sequence. Therefore, such n must satisfies that { 2 0 , 2 1 , . . . , 2 n − 1 } is a complete residue system, i.e., it has 2 as a primitive root modulo n .
It can be checked by direct computation or by the aid of Euler's criterion that such n ≤ 1 0 0 are: 3 , 5 , 1 1 , 1 3 , 1 9 , 2 9 , 3 7 , 5 3 , 5 9 , 6 1 , 6 7 , 8 3 .
Therefore, the answer is 12.
We define that a sequence covers a set if all the elements of the set are present infinitely many times in the sequence.
It is obvious that the numbers in each sequence are defined by a i + 1 ≡ 2 a i ( m o d n )
*Claim:- The necessary and sufficient condition for the Circle Cover number of n to be 2 is that the numbers ( 2 i ) i = 0 n − 2 have distinct residues modulo n and that 2 n − 1 ≡ 1 ( m o d n ) *
*Proof:- * Note that if finitely many terms of any sequence are deleted from the left, the condition of an integer appearing infinitely many times in the sequence still remains unaltered. Now consider any sequence that contains n . Delete the terms of this sequence which appear before n . Then note that the terms after n will be n , n , n , . . . . So any sequence which contains n must cover n and only n . Since the set of two sequences cover the entire set 1 , 2 , . . . , n , the other sequence must cover the set 1 , 2 , . . . , n − 1 . Delete the terms of this sequence which appear before 1 . Then note that the resultant sequence will be of the form 2 0 , r n ( 2 1 ) , r n ( 2 2 ) , . . . , r n ( 2 n − 2 ) , where r n ( x ) is the remainder when x is divided by n if n does not divide x , r n ( x ) = n if n ∣ x . For this sequence to cover 1 , 2 , . . . , n − 1 , the residues of the powers of 2 must vary through 1 to n − 2 , i.e they must all be distinct. Also note that we don't want any number to be skipped after once the sequence 1 , 2 , . . . , n − 2 appears, or else we can delete the terms before the skipped number, and obtain a sequence which does not contain that number. So we must have the next number equal to 1 , so 2 n − 1 ≡ 1 ( m o d n ) . Hence the claim is proved.
Now
2
n
−
1
≡
1
(
m
o
d
n
)
implies
n
is prime. Also we must have
2
a primitive root modulo
n
. (the next part of my solution is similar to that of
C
L
.
)
If
2
is a quadratic residue modulo
n
,
2
(
n
−
1
)
/
2
≡
1
(
m
o
d
n
)
, so
n
does not satisfy the conditions [the conditions for
a
to be a primitive root modulo
n
is that
a
k
ϕ
(
n
)
is not congruent to
1
modulo
n
, where
k
ranges over all positive prime divisors of
ϕ
(
n
)
). From quadratic reciprocity we conclude that the primes are of the form
8
m
+
3
and
8
m
+
5
. All such primes from
1
to
1
0
0
are
3
,
5
,
1
1
,
1
3
,
1
9
,
2
9
,
3
7
,
4
1
,
4
3
,
5
3
,
5
9
,
6
1
,
6
7
,
8
3
. But checking these we find out that
4
1
and
4
3
do not satisfy the conditions. So our answer will be
1
2
.
41 is not 8k+3 or 8k+5, so it should be ruled out at that point since 2 is a square mod 41.
Log in to reply
Yes, sorry. That was a very silly mistake.
Note several facts:
Therefore, n must be prime and we must be able to find a repeating part that goes through every number in { 1 , 2 , . . . , n − 1 } . We can rotate the repeating part to start with any of its elements, so we can assume without loss of generality that it starts with 1 . Then the repeating sequence would be: [ 1 , 2 , 4 , 8 , . . . , 2 n − 2 ] mod n would contain all of the numbers in { 1 , 2 , . . . , n − 1 } and 2 n − 1 = 1 mod n , which is equivalent to 2 being a primitive root modulo n .
Looking at the primes below 1 0 0 for which 2 is a primitive root, we get that the possible choices for n are in { 3 , 5 , 1 1 , 1 3 , 1 9 , 2 9 , 3 7 , 5 3 , 5 9 , 6 1 , 6 7 , 8 3 } . Therefore, there are 1 2 possible choices for n which have Circle Cover Number 2.
The problem is about make sequences in that way: a(i+1)=2ai(modn). If n is even (n=2k) we have that when ai=k a(i+1)=2k and then for every t>I at=n so we can't have any sequence with infinite numbers k's. So n is odd. But, with n odd don't exist k such that 2k=n(modn). Só or of the sequences A is n, n, n, n,... . The other sequence will have all the other numbers. So we can choose a0=1 and the sequence will be 2^k(modn) and he must have n-1 numbers. But orda(n) <=phi(n) <=n-1 where we have the equality if and only if n is prime and a is a primitive root modn. For the values of the problem we have that 2 is a primitive root for 12 values
Problem Loading...
Note Loading...
Set Loading...
It is clear that we have 2 a i ≡ a i + 1 ( m o d n ) . Thus it follows that a sequence A is in fact { k , 2 k , 4 k , . . . } except with its values taken modulo n .
Now, suppose n has circle cover 2 . Clearly n must occur infinitely many times in one of the sequences. But once that sequence has hit n as a value of some a i , it stays at n forever. Thus 1 , 2 , . . . , n − 1 only occur finitely many times in that sequence. Therefore it follows that the other sequence achieves all of the values 1 , 2 , . . . , n − 1 infinitely many times. This implies that o r d n ( 2 ) = n − 1 (if it were less, the sequence would begin to repeat before reaching all n − 1 numbers) and therefore n is a prime for which 2 is a primitive root. As 2 is a primitive root, it is a quadratic nonresidue and thus n ≡ 3 , 5 ( m o d 8 ) . Then by checking the primes under 1 0 0 which are 3 or 5 m o d u l o 8 we find that 2 is a primitive root for n = 3 , 5 , 1 1 , 1 3 , 1 9 , 2 9 , 3 7 , 5 3 , 5 9 , 6 1 , 6 7 , 8 3 , implying the answer is 1 2 .