sumsquare(0,0).
sumsquare(N,S) :- N1 is N-1, sumsquare(N1,S1),S is S1+N*N.

sumListSq([],0).
sumListSq([H|T],X) :- sumListSq(T,X1), X is X1+H*H. 
