GATE Computer ScienceHardGATE CS
How many residues r modulo 105 are perfect squares, that is, how many distinct values of x² mod 105 occur for x = 0, 1, …, 104 (r = 0 included)?
- A. 12
- B. 53
- C. 36
- D. 24
Correct answer: D. 24
By the Chinese remainder theorem a residue is a square mod 105 iff it is a square mod 3, mod 5 and mod 7. Squares mod 3: 2 values (0, 1); mod 5: 3 values (0, 1, 4); mod 7: 4 values (0, 1, 2, 4). Total 2 × 3 × 4 = 24. Counting only unit residues would give 1 × 2 × 3 = 6, which is the common wrong turn.
More Discrete Mathematics questions
- What is the exponent of the largest power of 2 that divides 7⁶⁰ − 1?
- How many ordered triples (a, b, c) of non-negative integers satisfy 2a + 3b + 5c = 40?
- A relation R on {1, 2, …, 8} contains exactly the pairs (1,2), (2,3), (3,1), (3,4), (5,6), (6,7), (7,5), (4,8), (8,8). How many ordered…
- How many walks of length 12 are there from vertex 0 to the antipodal vertex 4 in the cycle graph C₈ (vertices 0 to 7, i adjacent to i ± 1…
- In how many permutations of 1, 2, …, 7 does no entry i + 1 immediately follow the entry i (that is, there is no adjacent pair i, i + 1 in…
- How many pairwise non-isomorphic simple graphs (not necessarily connected) have 6 vertices and exactly 7 edges?