The polynomial \(P(x)=x^3+3x^2-7x+1\) has three distinct roots: \(a,b,\) and \(c\). What is the value of \(a^2+b^2+c^2\)?
Find the remainder of dividing \(x^{100}-2x^{51}+1\) by \(x^2-1\). Try not to do a long calculation.