Let's define C(k,n) = n!/(k!(n-k)!).
Binomial coefficients are widely used in combinatorics. The number of ways you can place something on something is an binomial coefficient. But we can't place the blue stripe on the end of the flag and side by side.
It is well-known, that
C(0,n) + C(1,n) + ... + C([n/2],[n/2]) = F[n+1]
where F[n+1] is (n+1)-th Fibonacci number and [n/2] is integer division [1].
I hope this my small review does not spoil you the solving of the problem. Thank you.
[1]
https://en.wikipedia.org/wiki/Fibonacci_number (Use in Mathematics)
accepted/sended = 13616/35461
Edited by author 11.01.2018 10:21 Edited by author 17.06.2019 01:04 Edited by author 17.06.2019 01:04