- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Show that one and only one out of $n$, $n+4$, $n+8$, $n+12$ and $n+16$ is divisible by 5, where $n$ is any positive integer.
Given: Numbers $n,\ n\ +\ 4,\ n\ +\ 8,\ n\ +\ 12$ and $n\ +\ 16$. $n$ is any positive integer.
To do: Here we have to show that one and only one out of $n$, $n+4$, $n+8$, $n+12$ and $n+16$ is divisible by 5.
Solution:
Let $n\ =\ 5q\ +\ r$, where $0\ \underline{< }\ r\ <\ 5$.
So, $r\ =\ 0,\ 1,\ 2,\ 3,\ 4$.
If $r\ =\ 0$ then, $n\ =\ 5q$. So,
$n\ =\ 5q$, which is divisible by 5.
$n\ +\ 4\ =\ 5q\ +\ 4$, which is not divisible by 5.
$n\ +\ 8\ =\ 5q\ +\ 8$, which is not divisible by 5.
$n\ +\ 12\ =\ 5q\ +\ 12$, which is not divisible by 5.
$n\ +\ 16\ =\ 5q\ +\ 16$, which is not divisible by 5.
If $r\ =\ 1$ then, $n\ =\ 5q\ +\ 1$. So,
$n\ =\ 5q\ +\ 1$, which is not divisible by 5.
$n\ +\ 4\ =\ 5q\ +\ 1\ +\ 4\ =\ 5q\ +\ 5$, which is divisible by 5.
$n\ +\ 8\ =\ 5q\ +\ 1\ +\ 8\ =\ 5q\ +\ 9$, which is not divisible by 5.
$n\ +\ 12\ =\ 5q\ +\ 1\ +\ 12\ =\ 5q\ +\ 13$, which is not divisible by 5.
$n\ +\ 16\ =\ 5q\ +\ 1\ +\ 16\ =\ 5q\ +\ 17$, which is not divisible by 5.
If $r\ =\ 2$ then, $n\ =\ 5q\ +\ 2$. So,
$n\ =\ 5q\ +\ 2$, which is not divisible by 5.
$n\ +\ 4\ =\ 5q\ +\ 2\ +\ 4\ =\ 5q\ +\ 6$, which is not divisible by 5.
$n\ +\ 8\ =\ 5q\ +\ 2\ +\ 8\ =\ 5q\ +\ 10$, which is divisible by 5.
$n\ +\ 12\ =\ 5q\ +\ 2\ +\ 12\ =\ 5q\ +\ 14$, which is not divisible by 5.
$n\ +\ 16\ =\ 5q\ +\ 2\ +\ 16\ =\ 5q\ +\ 18$, which is not divisible by 5.
If $r\ =\ 3$ then, $n\ =\ 5q\ +\ 3$. So,
$n\ =\ 5q\ +\ 3$, which is not divisible by 5.
$n\ +\ 4\ =\ 5q\ +\ 3\ +\ 4\ =\ 5q\ +\ 7$, which is not divisible by 5.
$n\ +\ 8\ =\ 5q\ +\ 3\ +\ 8\ =\ 5q\ +\ 11$, which is not divisible by 5.
$n\ +\ 12\ =\ 5q\ +\ 3\ +\ 12\ =\ 5q\ +\ 15$, which is divisible by 5.
$n\ +\ 16\ =\ 5q\ +\ 3\ +\ 16\ =\ 5q\ +\ 19$, which is not divisible by 5.
If $r\ =\ 4$ then, $n\ =\ 5q\ +\ 4$. So,
$n\ =\ 5q\ +\ 4$, which is not divisible by 5.
$n\ +\ 4\ =\ 5q\ +\ 4\ +\ 4\ =\ 5q\ +\ 8$, which is not divisible by 5.
$n\ +\ 8\ =\ 5q\ +\ 4\ +\ 8\ =\ 5q\ +\ 12$, which is not divisible by 5.
$n\ +\ 12\ =\ 5q\ +\ 4\ +\ 12\ =\ 5q\ +\ 16$, which is not divisible by 5.
$n\ +\ 16\ =\ 5q\ +\ 4\ +\ 16\ =\ 5q\ +\ 20$, which is divisible by 5.
Hence, in each case, only one out of $n,\ n\ +\ 4,\ n\ +\ 8,\ n\ +\ 12$ and $n\ +\ 16$ is divisible by 5.
Advertisements