(Candidates who have not followed the specialization course) Part A We consider the following algorithm:
\begin{tabular}{l} Variables:
Input: Processing:
Output:
&
$k$ and $p$ are natural integers
$u$ is a real number
Ask for the value of $p$
Assign to $u$ the value 5
For $k$ varying from 1 to $p$
Assign to $u$ the value $0,5u + 0,5(k-1) - 1,5$
End for
Display $u$
\hline \end{tabular} Run this algorithm for $p = 2$ by indicating the values of the variables at each step. What number do we obtain as output? Part B Let $(u_n)$ be the sequence defined by its first term $u_0 = 5$ and, for every natural integer $n$ by $$u_{n+1} = 0,5u_n + 0,5n - 1,5.$$
Modify the algorithm from the first part to obtain as output all the values of $u_n$ for $n$ varying from 1 to $p$.
Using the modified algorithm, after entering $p = 4$, we obtain the following results:
$n$
1
2
3
4
$u_n$
1
$-0,5$
$-0,75$
$-0,375$
Can we assert, based on these results, that the sequence $(u_n)$ is decreasing? Justify.
Prove by induction that for every natural integer $n$ greater than or equal to 3, $u_{n+1} > u_n$. What can we deduce about the monotonicity of the sequence $(u_n)$?
Let $(v_n)$ be the sequence defined for every natural integer $n$ by $v_n = 0,1u_n - 0,1n + 0,5$. Prove that the sequence $(v_n)$ is geometric with ratio 0,5 and express $v_n$ as a function of $n$.
Deduce that, for every natural integer $n$, $u_n = 2^{1-n} \cdot 5 + n - 5$ (or the equivalent closed form expression for $u_n$ as a function of $n$).
\textbf{(Candidates who have not followed the specialization course)}
\textbf{Part A}
We consider the following algorithm:
\begin{center}
\begin{tabular}{|l|l|}
\hline
\begin{tabular}{l}
Variables: \\
Input: Processing: \\
Output: \\
\end{tabular} & \begin{tabular}{l}
$k$ and $p$ are natural integers \\
$u$ is a real number \\
Ask for the value of $p$ \\
Assign to $u$ the value 5 \\
For $k$ varying from 1 to $p$ \\
Assign to $u$ the value $0,5u + 0,5(k-1) - 1,5$ \\
End for \\
Display $u$ \\
\end{tabular} \\
\hline
\end{tabular}
\end{center}
Run this algorithm for $p = 2$ by indicating the values of the variables at each step.\\
What number do we obtain as output?
\textbf{Part B}
Let $(u_n)$ be the sequence defined by its first term $u_0 = 5$ and, for every natural integer $n$ by
$$u_{n+1} = 0,5u_n + 0,5n - 1,5.$$
\begin{enumerate}
\item Modify the algorithm from the first part to obtain as output all the values of $u_n$ for $n$ varying from 1 to $p$.
\item Using the modified algorithm, after entering $p = 4$, we obtain the following results:
\begin{center}
\begin{tabular}{ | c | c | c | c | c | }
\hline
$n$ & 1 & 2 & 3 & 4 \\
\hline
$u_n$ & 1 & $-0,5$ & $-0,75$ & $-0,375$ \\
\hline
\end{tabular}
\end{center}
Can we assert, based on these results, that the sequence $(u_n)$ is decreasing? Justify.
\item Prove by induction that for every natural integer $n$ greater than or equal to 3, $u_{n+1} > u_n$.\\
What can we deduce about the monotonicity of the sequence $(u_n)$?
\item Let $(v_n)$ be the sequence defined for every natural integer $n$ by $v_n = 0,1u_n - 0,1n + 0,5$.\\
Prove that the sequence $(v_n)$ is geometric with ratio 0,5 and express $v_n$ as a function of $n$.
\item Deduce that, for every natural integer $n$, $u_n = 2^{1-n} \cdot 5 + n - 5$ (or the equivalent closed form expression for $u_n$ as a function of $n$).
\end{enumerate}