<?xml version="1.0"?>
<oembed><version>1.0</version><provider_name>SOUL OF MATHEMATICS</provider_name><provider_url>https://soulofmathematics.com</provider_url><author_name>Rajarshi Dey</author_name><author_url>https://soulofmathematics.com/index.php/author/rajarshidey1729gmail-com/</author_url><title>The Recam&#xE1;n Sequence - SOUL OF MATHEMATICS</title><type>rich</type><width>600</width><height>338</height><html>&lt;blockquote class="wp-embedded-content" data-secret="ZkxCn7haxk"&gt;&lt;a href="https://soulofmathematics.com/index.php/the-recaman-sequence/"&gt;The Recam&#xE1;n Sequence&lt;/a&gt;&lt;/blockquote&gt;&lt;iframe sandbox="allow-scripts" security="restricted" src="https://soulofmathematics.com/index.php/the-recaman-sequence/embed/#?secret=ZkxCn7haxk" width="600" height="338" title="&#x201C;The Recam&#xE1;n Sequence&#x201D; &#x2014; SOUL OF MATHEMATICS" data-secret="ZkxCn7haxk" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"&gt;&lt;/iframe&gt;&lt;script type="text/javascript"&gt;
/* &lt;![CDATA[ */
/*! This file is auto-generated */
!function(d,l){"use strict";l.querySelector&amp;&amp;d.addEventListener&amp;&amp;"undefined"!=typeof URL&amp;&amp;(d.wp=d.wp||{},d.wp.receiveEmbedMessage||(d.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&amp;&amp;!/[^a-zA-Z0-9]/.test(t.secret)){for(var s,r,n,a=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),o=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),c=new RegExp("^https?:$","i"),i=0;i&lt;o.length;i++)o[i].style.display="none";for(i=0;i&lt;a.length;i++)s=a[i],e.source===s.contentWindow&amp;&amp;(s.removeAttribute("style"),"height"===t.message?(1e3&lt;(r=parseInt(t.value,10))?r=1e3:~~r&lt;200&amp;&amp;(r=200),s.height=r):"link"===t.message&amp;&amp;(r=new URL(s.getAttribute("src")),n=new URL(t.value),c.test(n.protocol))&amp;&amp;n.host===r.host&amp;&amp;l.activeElement===s&amp;&amp;(d.top.location.href=t.value))}},d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",function(){for(var e,t,s=l.querySelectorAll("iframe.wp-embedded-content"),r=0;r&lt;s.length;r++)(t=(e=s[r]).getAttribute("data-secret"))||(t=Math.random().toString(36).substring(2,12),e.src+="#?secret="+t,e.setAttribute("data-secret",t)),e.contentWindow.postMessage({message:"ready",secret:t},"*")},!1)))}(window,document);
/* ]]&gt; */
&lt;/script&gt;
</html><thumbnail_url>https://i1.wp.com/soulofmathematics.com/wp-content/uploads/2020/08/recaman-2.gif?fit=800%2C600&amp;ssl=1</thumbnail_url><thumbnail_width>800</thumbnail_width><thumbnail_height>600</thumbnail_height><description>Recam&#xE1;n&#x2019;s sequence was named after its inventor, Colombian mathematician Bernardo Recam&#xE1;n Santos, by&nbsp;Neil Sloane, creator of the&nbsp;On-Line Encyclopedia of Integer Sequences (OEIS). It is a well known sequence&nbsp;defined by a recurrence relation. In computer science they are often defined by recursion. The Recam&#xE1;n Sequence is defined by- According to this sequence first few elements are- 0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62, 42, 63, 41, 18, 42, 17, 43, 16, 44, 15, 45, 14, 46, 79, 113, 78, 114, 77, 39, 78, 38, 79, 37, 80, 36, 81, 35, 82, 34, 83, 33, 84, 32, 85, 31, 86, 30, 87, 29, 88, 28, 89, 27, 90, 26, 91, 157, 224&#x2026; The sequence satisfies This is not a permutation of the integers: the first repeated term is&nbsp; Another one is&nbsp; Neil Sloane&nbsp;has conjectured that every number eventually appears,&nbsp;but it has not been proved. Even though 1015&nbsp;terms have been calculated (in 2018), the number 852,655 has not appeared on the list. MATLAB CODE FOR Recam&#xE1;n Sequence n=65; % Number of Terms in the Sequence A = zeros(1,n); A(1) = 0; for ii = 1:n-1 % Algorithm to create the sequence b = A(ii)-ii; A(ii+1) = b + 2*ii; if b &gt; 0 &amp;&amp; ~any(A == b) A(ii + 1) = b; end end hold on; axis equal; for i = 2:1:n % Plotting the Graphs y = 0; x = (A(i)+A(i-1))/2; r = (A(i)-A(i-1))/2; th = 0:pi/50:pi; if A(i)&gt;A(i-1) xunit = r * cos(th) + x; yunit = r * sin(th) + y; end if A(i)&lt;A(i-1) xunit = -r * cos(th) + x; yunit = -r * sin(th) + y; end if mod(i,2) == 0 h = plot(xunit, -yunit,'k'); else h = plot(xunit, yunit,'k'); end end</description></oembed>
