The algorithm for calculating the value of the function F(n)
, where n
– natural number, given by the following relations:
F(n) = 3
if n <= 10
;
F(n) = F(n / 7) + n - 1
if 10 < n <= 200
, and the number n
is a multiple of 7;
F(n) = F(n - 1) + n + 1
if 10 < n <= 200
and n
is not a multiple of 7;
F(n) = F(n - 7) + 7
if n > 200.
What is the smallest value of n
result F(n)
will be equal to 106
?