Problem Statement
A number when divided by 5 leaves remainder 3. What will be the remainder when the square of this number is divided by 5?
Explanation
Let the number be represented as 5k plus 3 where k is any integer. This form represents all numbers that leave remainder 3 when divided by 5.
Squaring the number: Number squared equals open parenthesis 5k plus 3 close parenthesis squared equals 25k squared plus 30k plus 9 equals 5 times open parenthesis 5k squared plus 6k plus 1 close parenthesis plus 4. When we divide this by 5, we get quotient 5k squared plus 6k plus 1 and remainder 4. Example: Take number 8 which is 5 times 1 plus 3. 8 squared equals 64. 64 divided by 5 gives remainder 4.
Code Solution
SolutionRead Only
// Let number = 5k + 3 // Examples: 3, 8, 13, 18, 23... // Square of number: // (5k + 3)² = 25k² + 30k + 9 // = 25k² + 30k + 5 + 4 // = 5(5k² + 6k + 1) + 4 // When divided by 5: // Remainder = 4 // Verification: // Number = 8 (8÷5 gives remainder 3) // 8² = 64 // 64 ÷ 5 = 12 remainder 4 ✓
Practice Sets
This question appears in the following practice sets:
