I'm not sure what you want me to check.
These 0,1 rvs are called Bernoullis and their sum is a Binomial.
You have a few typos.
C runs from 1 to n.
You accidentally are starting at 0.
O,1,...,n are n+1 terms.
But n/2 is correct.
You want 1,...,n in your sums.
Also that is just weird.
It can't be a lower value since it's greater than n, your upper limit.
You want 1,..,n in your series, all of them.