
Algebra PreAlgebra and Basic Algebra Math Forum 
 LinkBack  Thread Tools  Display Modes 
January 20th, 2018, 12:45 PM  #11 
Senior Member Joined: Sep 2015 From: USA Posts: 2,122 Thanks: 1102 
We need to ensure that the total number of flips has the same parity as $n$ The total number of flips is $T=\dfrac{n(n+1)}{2}$ If $n$ is odd $T=2k+1,~\text{ for some } k \in \mathbb{Z},~k\geq 0$ $\dfrac{n(n+1)}{2} = 2k + 1$ $n^2 + n +\dfrac 1 4 = 4k+\dfrac 9 4$ $\left(n+\dfrac 1 2\right)^2 = \pm \sqrt{4k+\frac 9 4}$ $n = \dfrac 1 2\left(\sqrt{16k + 9}1\right)\wedge n \in \mathbb{N}$ This turns out to be equivalent to $n \pmod 4 \in \{1,2\}$ Similarly for $n$ even, allowable $n$'s are such that $n \pmod 4 \in \{0,3\}$ 