3n^2-1-2n*sin(n*pi/2)^2