Quote Originally Posted by daviddem View Post
There is a problem here where you invert your inequality, it should be k <= (1+n)/2
Yeah I caught it later in the text file I'd wrote all that out in but never changed it in my post, thanks.