Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A116624
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A116624 a(1)=1; for n>1, a(n) = least positive integer not appearing earlier such that {a(k)|1=<k<=n} and {a(k) XOR a(k-1) |1=<k<=n} are disjoint sets of distinct numbers. +0
4
1, 2, 4, 8, 5, 10, 16, 7, 9, 17, 32, 11, 18, 33, 19, 35, 20, 34, 22, 40, 21, 41, 28, 36, 27, 64, 29, 38, 31, 37, 65, 30, 66, 39, 68, 42, 67, 44, 70, 45, 69, 128, 46, 72, 47, 77, 129, 71, 131, 73, 130, 74, 132, 75, 134, 79, 136, 80, 133, 81, 135, 84, 137, 82, 139, 85 (list; graph; listen)
OFFSET

1,2

COMMENT

Another way to define this: A116624(1) = 1; A116624(n) = the least positive integer i distinct from any of A116624(1..n-1) and A116625(1..n-2), such that also (i XOR A116624(n-1)) is not present in A116625(1..n-2) nor in A116624(1..n-1).

PROGRAM

(MIT Scheme:)

(define (A116624 n) (cond ((= 1 n) 1) (else (let outloop ((i 1)) (let ((k (A003987bi i (A116624 (- n 1))))) (let inloop ((j (- n 1))) (cond ((zero? j) i) ((= i (A116624 j)) (outloop (+ i 1))) ((= i (A116625 (- j 1))) (outloop (+ i 1))) ((= k (A116625 (- j 1))) (outloop (+ i 1))) ((= k (A116624 j)) (outloop (+ i 1))) (else (inloop (- j 1))))))))))

CROSSREFS

Cf. Bisection of A116626. Complement of A116625? Cf. A003987, A116628.

Sequence in context: A165669 A021893 A036117 this_sequence A125733 A000689 A132137

Adjacent sequences: A116621 A116622 A116623 this_sequence A116625 A116626 A116627

KEYWORD

nonn

AUTHOR

Paul D. Hanna (pauldhanna(AT)juno.com) and Antti Karttunen (His-Firstname.His-Surname(AT)gmail.com), Feb 21 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 17 13:29 EST 2009. Contains 170826 sequences.


AT&T Labs Research