The algorithm for calculating the value of the function F(n)
, where n
– natural number, given by the following relations:
F(0) = 5;
F(n) = n/15 + f(n/3)
if n > 0
, and the number n
is a multiple of 15;
F(n) = f(n-1)
otherwise.
Determine how many distinct values n,
belonging to the segment [1, 1000000], value F(n)
less than 100
?
The sign /
- means the operation of integer division.