sum floor((cos((1+(k-1)!)pi/k))^2) ,k=2 to 1000