summaryrefslogtreecommitdiff
path: root/progs/a663.py
blob: 7130b51b55f1fa931fa00357a16704d5dede3c70 (plain)
1
2
3
4
5
6
7
def count_binary_seq(n): 
	nCr = 1
	res = 1
	for r in range(1, n + 1): 
		nCr = (nCr * (n + 1 - r)) / r 
		res += nCr * nCr 
	return res