Find the remainder when 2 ^100 +3^100+4^100+5^100 is divided by7
=> (2^100+3^100+4^100+5^100)/7
=> (2.2^99 + 3.3^99 + 2^200 + 5.5^99)/7
=> [2*(2^3)^33 + 3*(3^3)^33 + 2^2*(2^3)^66 + 5*(5^3)^33]/7
=> [2*8^33 + 3*27^33 + 2^2*8^66 + 5*125^33]/7
=> [2*(7+1)^33 + 3*(28-1)^33 + 2^2*(7+1)^66 + 5*(126-1)^33]/7
=> Taking remainders, [2*1^33 + 3*(-1)^33 + 2^2*1^66 + 5*(-1)^33]/7
=> [2+ 3*(7-1)+ 4 + 5*(7-1)]/7; For [(-1)^n]/m; if n is odd, remainder is m - n.
=> [2 + 3*6 + 4 + 5*6]/7
=> 54/7 => Remainder is 5.