login
A269361
Lexicographically first injection of natural numbers beginning with a(1)=1 such that a(n)*a(n+1) is a fibbinary number (A003714), i.e., has no adjacent 1's in its base-2 representation.
7
1, 2, 4, 5, 8, 9, 16, 10, 13, 20, 17, 32, 18, 29, 36, 33, 40, 26, 21, 49, 42, 52, 25, 41, 50, 82, 57, 45, 53, 80, 34, 64, 37, 113, 74, 125, 84, 61, 72, 58, 73, 65, 68, 69, 128, 66, 129, 132, 133, 77, 114, 81, 117, 90, 104, 85, 98, 89, 93, 100, 105, 161, 106, 97, 169, 122, 137, 157, 138, 136, 121, 141, 149, 221, 153, 109, 160, 116, 144
OFFSET
1,2
COMMENTS
The sequence is conjectured to be a permutation of A091072.
LINKS
PROG
(Scheme, with defineperm1-macro from Antti Karttunen's IntSeq-library)
(defineperm1 (A269361 n) (cond ((= 1 n) n) (else (let ((prev (A269361 (- n 1)))) (let loop ((k 1)) (cond ((and (not-lte? (A269361inv_cache k) (- n 1)) (isa003714? (* k prev))) k) (else (loop (+ 1 k)))))))))
(define (A269361inv_cache n) (A269361 (- n)))
;; We consider a > b (i.e. not less than b) also in case a is #f.
;; (Because of the stateful caching system used by defineperm1-macro):
(define (not-lte? a b) (cond ((not (number? a)) #t) (else (> a b))))
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Feb 25 2016
STATUS
approved