Cody

Problem 44339. Recaman Sequence - II

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

Solution Stats

51.64% Correct | 48.36% Incorrect
Last solution submitted on Nov 23, 2017

Problem Comments

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!