File Exchange

image thumbnail

Recaman_seq

version 1.0.0 (1.91 KB) by Bjorn Gustavsson
Recaman_seq - Recaman-sequence-function. This function calculates the N first numbers (decorative plot optional) of the Recaman sequence.

0 Downloads

Updated 02 Nov 2020

View License

Recaman_seq - Recaman-sequence-function. This function calculates the N first numbers (decorative plot optional) of the Recaman sequence. (https://oeis.org/A005132, https://en.wikipedia.org/wiki/Recam%C3%A1n%27s_sequence), the Recaman sequence is irregular, where the length of the step from one element to the next increases by one, the step-direction is down if the landing-point is not yet part of the sequence, otherwise up. It is not known if every natural number is part of the sequence.

If the cmlines-function (from the FEX-contribution:COLORMAP and COLORBAR utilities ) is available the plot becomes prettier.

Cite As

Bjorn Gustavsson (2021). Recaman_seq (https://www.mathworks.com/matlabcentral/fileexchange/82179-recaman_seq), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!