The fractional part function of a positive real number r, denoted as
, is defined as:
, where
, is the 'floor' of r. Thus,
,
and
.
Given a positive integer n, create the function
, that evaluates the following summation:
For example for
:
Please present the function output rounded-off to nearest integer. Therefore, for
, the function should return 3.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers5
Suggested Problems
-
Project Euler: Problem 5, Smallest multiple
1651 Solvers
-
Replace pattern 0 1 0 and 1 0 1
159 Solvers
-
Compute the nth term from the Sieve of Flavius Josephus
18 Solvers
-
Compute the nth term from the golden sieve
19 Solvers
-
9 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!