Recaman Sequence - II - MATLAB Cody - MATLAB Central

Problem 44339. Recaman Sequence - II

Difficulty:Rate

Take an arbitrary starting point as input and create Recaman Sequence. Then find the 1, return its index.

For example: if n = 0 (default Recaman sequence)

seq = [0 1 3 6 2];

1 is in the second place.

if n = 10;

seq = [10 9 7 4 8 3 9 2 10 1 11 22 34 21];

1 is in the 10th place

Related Challenges :

  1. Recaman Sequence - I
  2. Recaman Sequence - II
  3. Recaman Sequence - III

Solution Stats

57.14% Correct | 42.86% Incorrect
Last Solution submitted on Feb 23, 2025

Problem Comments

Solution Comments

Show comments
Primes and Rough Numbers, Basic ideas
What is a rough number? What can they be used...
2
4

Problem Recent Solvers272

Suggested Problems

More from this Author92

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page