A polite number is an integer that sums of at least two consecutive positive integers.
For example 7 = 3+4 so 7 is a polite number.
Given N return N-th polite number.
See also 2595
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers165
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15779 Solvers
-
Increment a number, given its digits
683 Solvers
-
499 Solvers
-
Find a subset that divides the vector into equal halves
400 Solvers
-
550 Solvers
More from this Author40
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
As a heads up, http://oeis.org/A138591 counts 1 as a polite number, but the test suite does not.