This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A140259 #9 Jul 09 2025 04:28:57 %S A140259 3,3,2,1,5,4,3,3,2,1,7,6,5,5,4,3,3,2,1,10,9,8,8,7,6,6,5,4,4,3,2,2,1, %T A140259 14,14,13,12,12,11,10,10,9,8,8,7,6,6,5,4,4,3,2,2,1,21,21,20,19,19,18, %U A140259 17,17,16,15,15,14,13,13,12,11,11,10,9,9,8,7,7,6,5,5,4,3,3,2,1,32,31 %N A140259 a(0)=3; a(n)=A002264(n+11) if a(n-1)=1, a(n) = a(n-1)-1 if (n-1) mod 3 <> 0, otherwise a(n-1). %C A140259 Position of the knot after each iteration in Werneck's Black Pearl Necklace problem. %H A140259 Nicolau Werneck, <a href="http://www.lti.pcs.usp.br/~nwerneck/adaptoide/">Adaptoide</a>, a library for adaptive finite automata. Source code in C++ available. %H A140259 Nicolau Werneck, <a href="http://network.nature.com/blogs/user/nwerneck/2008/01/18/the-black-pearl-necklace">The Black Pearl Necklace</a>, description of the problem. %H A140259 Nicolau Werneck, et al. <a href="http://forum.wolframscience.com/showthread.php?threadid=1506">Discussion on the NKS Forum</a> %o A140259 (Scheme) (define (A140259 n) (cond ((zero? n) 3) ((= 1 (A140259 (- n 1))) (A002264 (+ n 11))) ((not (zero? (modulo (- n 1) 3))) (- (A140259 (- n 1)) 1)) (else (A140259 (- n 1))))) %Y A140259 Cf. A134342, A140260, A140261. %K A140259 nonn %O A140259 0,1 %A A140259 _Antti Karttunen_, May 16 2008, based on the 2008 postings by Nicolau Leal Werneck (nwerneck(AT)gmail.com)