JEE Main 2021 · 22 July · evening · Numerical answer · +4 / −0
The sum of all the elements in the set n∈ 1, 2, ....., 100 | H.C.F. of n and 2040 is 1 is equal to _____________.
Answer and solution
Answer 1251
Solution
Maths sir · 3 steps
Factor 2040 first. Then add the multiples of its primes with inclusion-exclusion and subtract from 5050.
- Factor 2040. 2040 = 2³ × 3 × 5 × 17. So gcd(n, 2040) = 1 exactly when n is not divisible by 2, 3, 5 or 17.
- Sum of multiples. The multiples of d up to 100 are d, 2d, …, md with m = ⌊ 100/d ⌋. This is an AP, so its sum is S(d) = d × m(m+1)/2. For example, S(17) = 17 × 15 = 255.
Divisors used Terms Total Sign All of 1 to 100 (100 × 101)/2 5050 + 2, 3, 5, 17 2550 + 1683 + 1050 + 255 5538 - 6, 10, 15, 34, 51, 85 816 + 550 + 315 + 102 + 51 + 85 1919 + 30 (102, 170, 255, 510 exceed 100) 30 × 6 180 - 5050 - 5538 + 1919 - 180 = 1251
- So. The sum of all n from 1 to 100 that are coprime to 2040 is 1251.
The common slip: 1268. Forgetting the prime 17 in 2040 gives 1268. That total still wrongly includes n = 17.
The idea to keep. To find numbers coprime to N, list only the distinct primes of N. Then use inclusion-exclusion on the sums of their multiples. Each sum of multiples is an AP.
Answer from the NTA final answer key. Solution by PrepWiser.