Problem 53119. Easy Sequences 53: Greatest Proper Divisor

The greatest proper divisor () of an integer x is the largest integer y, such that and . Furthermore, we define: .
Below is the set of 's of numbers from 1 to :
.
Given an integer n, create a function that outputs the sum of 's of all integers from 1 to n, inclusive. For , your function should return, .
TIP: Good algorithms for finding GPD's for numbers 1 to , can be found in Rosetta Code.

Solution Stats

57.14% Correct | 42.86% Incorrect
Last Solution submitted on Jun 30, 2023

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers4

Suggested Problems

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!