{"version":"1.0","provider_name":"SOUL OF MATHEMATICS","provider_url":"https:\/\/soulofmathematics.com","author_name":"Rajarshi Dey","author_url":"https:\/\/soulofmathematics.com\/index.php\/author\/rajarshidey1729gmail-com\/","title":"The Recam\u00e1n Sequence - SOUL OF MATHEMATICS","type":"rich","width":600,"height":338,"html":"<blockquote class=\"wp-embedded-content\" data-secret=\"zIQDbKr0C6\"><a href=\"https:\/\/soulofmathematics.com\/index.php\/the-recaman-sequence\/\">The Recam\u00e1n Sequence<\/a><\/blockquote><iframe sandbox=\"allow-scripts\" security=\"restricted\" src=\"https:\/\/soulofmathematics.com\/index.php\/the-recaman-sequence\/embed\/#?secret=zIQDbKr0C6\" width=\"600\" height=\"338\" title=\"&#8220;The Recam\u00e1n Sequence&#8221; &#8212; SOUL OF MATHEMATICS\" data-secret=\"zIQDbKr0C6\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" class=\"wp-embedded-content\"><\/iframe><script type=\"text\/javascript\">\n\/* <![CDATA[ *\/\n\/*! This file is auto-generated *\/\n!function(d,l){\"use strict\";l.querySelector&&d.addEventListener&&\"undefined\"!=typeof URL&&(d.wp=d.wp||{},d.wp.receiveEmbedMessage||(d.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&&!\/[^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<o.length;i++)o[i].style.display=\"none\";for(i=0;i<a.length;i++)s=a[i],e.source===s.contentWindow&&(s.removeAttribute(\"style\"),\"height\"===t.message?(1e3<(r=parseInt(t.value,10))?r=1e3:~~r<200&&(r=200),s.height=r):\"link\"===t.message&&(r=new URL(s.getAttribute(\"src\")),n=new URL(t.value),c.test(n.protocol))&&n.host===r.host&&l.activeElement===s&&(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<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);\n\/* ]]> *\/\n<\/script>\n","thumbnail_url":"https:\/\/i1.wp.com\/soulofmathematics.com\/wp-content\/uploads\/2020\/08\/recaman-2.gif?fit=800%2C600&ssl=1","thumbnail_width":800,"thumbnail_height":600,"description":"Recam\u00e1n&#8217;s sequence was named after its inventor, Colombian mathematician Bernardo Recam\u00e1n 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\u00e1n 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&#8230; 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\u00e1n 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"}