Problem 60271. Hofstadter G sequence
The Hofstadter G sequence is defined as follows:
The first elements of the sequence are 0, 1, 1, 2, 3, 3, 4, 4, 5, 6.
Write a function to compute
for a given n.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers12
Suggested Problems
-
4179 Solvers
-
1246 Solvers
-
How to find the position of an element in a vector without using the find function
2810 Solvers
-
Number of 1s in a binary string
10914 Solvers
-
Split a string into chunks of specified length
2044 Solvers
More from this Author53
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!