Easy Sequences 66: Fractional Part of Sum of Consecutive Powers over a Prime - MATLAB Cody - MATLAB Central

Problem 53940. Easy Sequences 66: Fractional Part of Sum of Consecutive Powers over a Prime

Difficulty:Rate
Given three postive integers, x, e and n, create the function , defined as follows:
Where is the nth prime and the symbol is the fractional part function of a positive real number, defined as follows:
If then , where , is the 'floor' of r.
For example for , and , we have:
Therefore, since :
Please round-off the output to four decimal places, so in this case: .
HINT: This is related to the Faulhaber's formula.

Solution Stats

60.0% Correct | 40.0% Incorrect
Last Solution submitted on Sep 06, 2023

Problem Comments

Solution Comments

Show comments

Group

Easy Sequences Volume I Image
Easy Sequences Volume I
  • 10 Problems
  • 8 Finishers

Problem Recent Solvers4

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page