Given that N = 1! + 2! + 3! + . . . . . + 12! + 13! + 14! + 15! and we need to find the remainder when N is divided by 5In these type of problems we need to find a pattern and then try to eliminate the terms based on the pattern.Now, N = 1! + 2! + 3! + . . . + 15! and we know that a higher factorial will always be a multiple of lower factorial
Ex: 4! = 1*2*3*4 = 3! * 4
So, if we can prove that the remainder of lets say n! with 5 is 0 then remainder of all higher factorials like (n+1)!, (n+2)! will be 0 too.
So, lets start finding the remainder of factorials from 1 onwards by 5 and see when we can reach a remainder of 0
Remainder of 1! by 5 = Remainder of 1 by 5 = 1
Remainder of 2! by 5 = Remainder of 1*2(=2) by 5 = 2
Remainder of 3! by 5 = Remainder of 1*2*3(=6) by 5 = 1
Remainder of 4! by 5 = Remainder of 1*2*3*4(=24) by 5 = 4
Remainder of 5! by 5 = Remainder of 1*2*3*4*5 by 5 = 0 (As it is a multiple of 5)
Now, all factorials from 5! onwards will give a remainder of 0 when divided by 5, as all of them will be a multiple of 5.
=> Remainder of N with 5 = Remainder of (1! + 2! + 3! + . . . + 15!) by 5 = Remainder of 1! by 5 + Remainder of 2! by 5 and so on
(Theory: Remainder of sum of two numbers by a number is same as the sum of remainder of those two numbers (individually) by that number)= 1 + 2 + 1 + 4 + 0....+0 = 1 + 2 + 1 + 4 = 8
But remainder of N by 5 cannot be greater than 4
(Theory: If we are dividing a number by n then we can get remainders only from 0 to n-1)=> Remainder will be = Remainder of 8 by 5 = 3
So,
Answer will be DHope it helps!
Watch the following video to learn the Basics of Remainders