Qm

A quick test for divisibility by 7

Is 2,401 divisible by 7? Is 3,457? Is 100,002?

Find a rule for testing divisibility by 7 that involves only the digits of the number, prove that it works, and apply it to those three numbers. Then adapt the same idea to produce a test for divisibility by 13.

Show a hint

Try this: chop off the last digit, double it, and subtract from what remains. Why would that preserve divisibility by 7?

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

Why one less than a prime's square is always a multiple of 24A hundred animals for a hundred poundsThe last digit of seven to the seven to the sevenThe last two digits of seven to the power 2024The missing digit of two to the twenty-ninth
All questions →