summaryrefslogtreecommitdiff
path: root/progs/a466.py
blob: 5206c2a0b6b63f08a460a4558c25318f63b4ce83 (plain)
1
2
3
4
5
6
def eulerian_num(n, m): 
	if (m >= n or n == 0): 
		return 0 
	if (m == 0): 
		return 1 
	return ((n - m) * eulerian_num(n - 1, m - 1) +(m + 1) * eulerian_num(n - 1, m))