## 2020年2月16日日曜日

### 数学 - Python - 解析学 - 関数列と関数級数 - 整級数 - 実数、正の整数、組み合わせ、二項定理

1. $\begin{array}{l}\left(\begin{array}{c}\alpha -1\\ n-1\end{array}\right)+\left(\begin{array}{c}\alpha -1\\ n\end{array}\right)\\ =\frac{\left(a-1\right)\left(\left(\alpha -1\right)-1\right)·\dots ·\left(\left(a-1\right)-\left(\left(n-1\right)-1\right)\right)}{\left(n-1\right)!}\\ +\frac{\left(\alpha -1\right)\left(\left(\alpha -1\right)-1\right)·\dots ·\left(\left(\alpha -1\right)-\left(n-1\right)\right)}{n!}\\ =\frac{\left(\alpha -1\right)\left(\left(\alpha -1\right)-1\right)·\dots ·\left(\left(\alpha -1\right)-\left(\left(n-1\right)-1\right)\right)}{n!}\left(\left(\alpha -1\right)-\left(n-1\right)+n\right)\\ =\frac{\alpha \left(\alpha -1\right)\left(\alpha -2\right)·\dots \left(\alpha -n+1\right)}{n!}\\ =\left(\begin{array}{c}\alpha \\ n\end{array}\right)\end{array}$

（証明終）

コード

#!/usr/bin/env python3
from unittest import TestCase, main
from sympy.functions.combinatorial.numbers import nC
import random

print('2.')

class MyTestCase(TestCase):
def test(self):
for _ in range(10):
alpha = random.randrange(-100, 100)
n = random.randrange(1, 100)
self.assertEqual(nC(alpha - 1, n - 1) + nC(alpha - 1, n),
nC(alpha, n))

if __name__ == "__main__":
main()


% ./sample2.py -v
2.
test (__main__.MyTestCase) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.023s

OK
%