[n(n-1)][(n-2)(n+1)]=840
(n^2-n)(n^2-n-2)=840
let y=n^2-n
y(y-2)=840
Solving the quadratic equation , gives y= -28 or 30
therefore, -28=n^2-n or 30=n^2-n
Solving the above quadratic equation, gives
n=[1+(-111)^(1/2)]/2 or n=[1-(-111)^(1/2)]/2 or n= -5 or n=6
For solving the quadratic equation ,
ax^2+bx+c=0 => x=[-b+(b^2-4ac)^(1/2)]/(2a) or x=[-b-(b^2-4ac)^(1/2)]/(2a)