login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 3
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Position of the knot after each iteration in Werneck's Black Pearl Necklace problem.

LINKS

Table of n, a(n) for n=0..86.

Nicolau Werneck, Adaptoide, a library for adaptive finite automata. Source code in C++ available.

Nicolau Werneck, The Black Pearl Necklace, description of the problem.

Nicolau Werneck, et al. Discussion on the NKS Forum

PROG

(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)))))

CROSSREFS

Cf. A134342, A140260, A140261.

Sequence in context: A283755 A038766 A080993 * A175644 A102905 A020862

Adjacent sequences:  A140256 A140257 A140258 * A140260 A140261 A140262

KEYWORD

nonn

AUTHOR

Antti Karttunen, May 16 2008, based on the 2008 postings by Nicolau Leal Werneck (nwerneck(AT)gmail.com).

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 19 15:50 EDT 2019. Contains 328223 sequences. (Running on oeis4.)