AI InterviewSearch…Search problems, topics, or pages…Ctrl KGet started
Easyremainderscyclicity

~45s

Remainder of 3²¹ ÷ 5

What is the remainder when 3²¹ is divided by 5?

Show the answer and the worked solution

Correct answer: C.

3

Worked solution

  1. Remainders of 3ⁿ mod 5 cycle: 3, 4, 2, 1.
  2. 21 mod 4 = 1, so 3²¹ sits at the first position of the cycle.
  3. The remainder is 3.

Answer: 3.

The idea

Find the cycle by computing the first few powers, then use the exponent modulo the cycle length — remembering that a remainder of 0 means the last position, not the first.

Shortcut. A remainder on division by 5 follows from the unit digit. 3²¹ ends in 3 (21 leaves 1 on division by 4), and a number ending in 3 leaves 3.

Common trap. 1 — stopping at 3²⁰ = (3⁴)⁵, which leaves 1, and forgetting the one extra factor of 3.

Remainder of 3²¹ ÷ 5 — Number System Aptitude Question

Remainder of 3²¹ ÷ 5: What is the remainder when 3²¹ is divided by 5? Answer and worked solution on CodeKairo.

Question

What is the remainder when 3²¹ is divided by 5?

Options

  1. 1
  2. 2
  3. 3
  4. 4
Show the answer and the worked solution

Correct answer: C. 3

Worked solution

  1. Remainders of 3ⁿ mod 5 cycle: 3, 4, 2, 1.
  2. 21 mod 4 = 1, so 3²¹ sits at the first position of the cycle.
  3. The remainder is 3.

Answer: 3.

The idea

Find the cycle by computing the first few powers, then use the exponent modulo the cycle length — remembering that a remainder of 0 means the last position, not the first.

Shortcut. A remainder on division by 5 follows from the unit digit. 3²¹ ends in 3 (21 leaves 1 on division by 4), and a number ending in 3 leaves 3.

Common trap. 1 — stopping at 3²⁰ = (3⁴)⁵, which leaves 1, and forgetting the one extra factor of 3.

All Number System questions · placement mock tests