If P is a prime number greater than 5, what is the remainder when P^2 is divided by 8.  Pick one:
A) 4  B) 3  C) 2  D) 1  E) Cannot be determined
Here is the algebraic approach..   these prime numbers are of teh form 6n+1 or 6n-1..   so P= 6n+1..   P^2=(6n+1)2=36n^2+12n+1   Now 36n^2+12n=4n(9n+3)   if n is even... 4n will be div by 8....   if n is odd.. 4n will be div by 4 and 9n+3 will become even and be div by 2,hence 4n*(9n+3) will be div by 4*2=8..   so in P^2=36n^2+12n+1 only 1 is left, Remainder = 1.   ANSWER:1
<result>D</result>
If P is a prime number greater than 5, what is the remainder when P^2 is divided by 8.