Problem 53119. Easy Sequences 53: Greatest Proper Divisor
The greatest proper divisor ( ) of an integer x is the largest integer y, such that
) of an integer x is the largest integer y, such that  and
 and  . Furthermore, we define:
. Furthermore, we define:  .
. 
Below is the set of  's of numbers from 1 to
'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
's of all integers from 1 to n, inclusive. For  , your function should return,
, your function should return,  .
.
Solution Stats
Problem Comments
- 
		1 Comment
		GeeTwo
    	on 30 Jun 2023
	
	
  	Really is an easy one! Solved the single cases in an hour, another hour to speed it up enough for the multiple cases.
Also, why is my solution showing up as if it were the first submitted?
Solution Comments
Show commentsProblem Recent Solvers4
Suggested Problems
- 
         
         2319 Solvers 
- 
         Give me Hamming on five, hold the mayo 52 Solvers 
- 
         Return fibonacci sequence do not use loop and condition 711 Solvers 
- 
         Find the Final State of an Abelian Sandpile 70 Solvers 
- 
         
         746 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!