points: 15 level: Medium title: Problem 11 author: Abhay Rana nemo@sdslabs.co.in answer: 6046e73cf774dda7b4317dc37ed6e6645ebdb939
Consider a series
- $S(n+1) = S(n)/2 $ if S(n) is divisible by 4
-
$S(n+1) = 3 \cdot S(n)$ if S(n)%4 = 1$ -
$S(n+1) = S(n)-25$ if S(n)%4=2$ -
$S(n+1) = S(n)+4$ otherwise$
The series is considered to terminate when
E.g. consider that we initialize
Find