grandes-ecoles 2019 Q48

grandes-ecoles · France · centrale-maths2__psi Sequences and Series Algorithmic/Computational Implementation for Sequences and Series
For $j \in \mathbb{N}$, we denote by $Y_{n,j}$ the set of partitions whose first term $\alpha_1$ is less than or equal to $j$ and by $y_{n,j}$ the cardinality of $Y_{n,j}$; we set $y_{0,0} = 1$.
Write a Python function that takes as argument an integer $n \geqslant 1$ and returns $y_{n,n}$.
For $j \in \mathbb{N}$, we denote by $Y_{n,j}$ the set of partitions whose first term $\alpha_1$ is less than or equal to $j$ and by $y_{n,j}$ the cardinality of $Y_{n,j}$; we set $y_{0,0} = 1$.

Write a Python function that takes as argument an integer $n \geqslant 1$ and returns $y_{n,n}$.