# Understand the problem

##### Source of the problem

##### Topic

##### Difficulty Level

##### Suggested Book

# Start with hints

Let us denote the residue class of by . Show that, there exist non-zero in such that and .

From hint 2, show that . This means that (you need to convince yourself that the inverses exist). Now it becomes a matter of simply choosing .

Note that, cannot be zero. Given any , there exists exactly one non-zero such that is 0 modulo . Hence, in this case there are choices. For , this special is actually 0. Hence in this case there are choices. Thus, the total number of choices is . Adding to this the cases considered in hint 1, we get as the answer.

# Watch video

# Connected Program at Cheenta

#### Math Olympiad Program

Math Olympiad is the greatest and most challenging academic contest for school students. Brilliant school students from over 100 countries participate in it every year. Cheenta works with small groups of gifted students through an intense training program. It is a deeply personalized journey toward intellectual prowess and technical sophistication.