We define the N-N's Sequence, as the series of all positive integers in ascending order and with repetition, wherein any number n appears n times. The first few elements of this sequence are as follows:
As you can see, 4 appears 4 times, 7 appears 7 times,
appears
times, etc...
Write a function that output the number n occuping the
position.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers14
Suggested Problems
-
993 Solvers
-
161 Solvers
-
Back to basics 25 - Valid variable names
336 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
13607 Solvers
-
Moving average (variable kernel length)
135 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!