To find the number of integers k in the set {0,1,2,…,2012} such that (k2012) is a multiple of 2012, we need to consider the prime factorization of 2012.
First, we factorize 2012:
2012=22×503
Thus, (k2012) is a multiple of 2012 if and only if it is a multiple of both 4 and 503.
### Step 1: Condition for (k2012) to be a multiple of 4
We use the p-adic valuation, specifically ν2, which counts the number of factors of 2 in a number. For (k2012) to be a multiple of 4, we need:
ν2((k2012))≥2
Using the property of p-adic valuation for binomial coefficients:
ν2((k2012))=ν2(2012!)−ν2(k!)−ν2((2012−k)!)
From the lemma, ν2(n!)=n−B(n), where B(n) is the number of 1's in the binary representation of n. Therefore:
ν2(2012!)=2012−B(2012)
ν2(k!)=k−B(k)
ν2((2012−k)!)=(2012−k)−B(2012−k)
Thus:
ν2((k2012))=(2012−B(2012))−(k−B(k))−((2012−k)−B(2012−k))
=2012−B(2012)−k+B(k)−2012+k+B(2012−k)
=B(k)+B(2012−k)−B(2012)
For (k2012) to be a multiple of 4:
B(k)+B(2012−k)−B(2012)≥2
### Step 2: Binary Representation Analysis
The binary representation of 2012 is:
2012=111110111002
Thus, B(2012)=8.
We need:
B(k)+B(2012−k)≥10
### Step 3: Counting k such that B(k)+B(2012−k)≥10
We need to count the number of k such that B(k)+B(2012−k)≥10. This involves considering the cases where there is carrying in the binary addition of k and 2012−k.
### Step 4: Condition for (k2012) to be a multiple of 503
For (k2012) to be a multiple of 503, k must be a multiple of 503. The possible values of k are:
k=0,503,1006,1509,2012
### Step 5: Combining Conditions
We need to combine the conditions from steps 1 and 4. We have:
- 512 values of k from the binary condition.
- 3 values of k from the multiple of 503 condition.
Thus, the total number of k that fail both conditions is:
512+3=515
### Conclusion
The number of integers k such that (k2012) is a multiple of 2012 is:
2013−515=1498