Problem 52283. Find numbers in the Popular Computing Z-sequence
Here’s a quick one. In 1977 the magazine Popular Computing sought “problem situations for which the computer is the best (if not the only) tool for solution” and proposed the Z-sequence as a candidate “problem situation:”
and for
Among the Z-sequence’s properties, the magazine staff pointed out that “successive values seem unpredictable; that is, the values jump around, but not too wildly” and “almost every integer appears as a term in the sequence sooner or later, except for a few numbers, such as 245, 449, 569, 575, and 903.”
Write a function to find the index of the first occurrence of k (including the five numbers above) in the Popular Computing Z-sequence.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers14
Suggested Problems
-
Find the peak 3n+1 sequence value
2498 Solvers
-
3372 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1820 Solvers
-
Project Euler: Problem 10, Sum of Primes
1717 Solvers
-
Find the maximum two numbers of every column of a matrix
194 Solvers
More from this Author279
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!