Some variations of Recamán's Sequence

in #steemstem8 years ago (edited)

untitled.png

Inspired by Alex Bellos, who presented clever illustration of Recamán's Sequence in recent video from Numberphile, I decided to implement this sequence in MATLAB/GNU Octave enviroment and get some other views of this sequence. And, what is the most important - get much more terms and see how they looks like.

The general idea of Recamán's Sequence is substracting the present index of the sequence from previous term every time we can do this so the result is over than zero. And second condition: the result have to be new term in the sequence, terms cannot be repeated. In other cases we define new term by adding present index, not substracting. Let’s see how it looks like in math expression:

sequence.PNG

As you can see, it is not difficult to express. Using this formulas, we can generate the Recamán's Sequence, and its first few terms are: 0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, …

On first sight, it is hard to see something alluring in this sequence. Just some numbers. But the beauty of mathematics lies in expressing apparent universality in many ways. Some of them are very interesting. Like this one. Let’s draw some graphs.

bargraph1.png

Bar graph of 3500 terms in the sequence


black1.png

Circle graph of 32 terms in the sequence in black color


color1.png

Colorized


100color.png

Circle graph of 100 terms in the sequence, colorized


cart2pcolor.png

Circle graph of 32 terms in the sequence, colorized (the cartesian coordinates are transformed into polar)


100colorblocked.png

Circle graph of 100 terms in the sequence, colorized (plot window is blocked by arbitrary values)


If we use semicircles to link neighboring terms of the sequence and we assume that we change angle from 0 to π and from π to 2π alternately, we can get such pictures. Radius of each circle is of course related to terms and it is present term minus previous term divided by 2.

As we can see, in maths we can find the element of beauty.

Sort:  

Really love your computer generated images of the sequence. Recently there was a numberphile video about the Recamán sequence. ->


Besides a visual representation a pretty neat way of thinking about it is terms of notes on a keyboard. The above video also contains a sound bite of the sequence :)

Thank you very much! I saw this video from Numberphile and it was my main inspiration to do some numerical experiments. Music is not far from math really and this video is excellent example :)

Mathematics look like magic to me... Yes, because I am not really into it.

Good post from @romualdd.


I am @teekingtv and I write STEM.

Thanks! I will try to present other mathematical problems in simple way :)

Hi @romualdd!

Your post was upvoted by utopian.io in cooperation with steemstem - supporting knowledge, innovation and technological advancement on the Steem Blockchain.

Contribute to Open Source with utopian.io

Learn how to contribute on our website and join the new open source economy.

Want to chat? Join the Utopian Community on Discord https://discord.gg/h52nFrV

Congratulations @romualdd! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard!


Participate in the SteemitBoard World Cup Contest!
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: @good-karma and @lukestokes


Do you like SteemitBoard's project? Then Vote for its witness and get one more award!