login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A266191
Sequence beginning with a(1)=1, a(2)=2, a(3)=3 and then after each new term a(n) is selected as the least unused number for which a(n)*a(n-1)*a(n-2) is a fibbinary number (A003714), i.e., has no adjacent 1's in its base-2 representation.
8
1, 2, 3, 6, 4, 7, 12, 8, 11, 15, 16, 22, 24, 5, 39, 14, 10, 59, 28, 20, 67, 31, 9, 63, 19, 18, 27, 38, 17, 54, 47, 34, 44, 51, 33, 88, 30, 32, 43, 48, 21, 86, 23, 42, 35, 46, 84, 70, 91, 168, 71, 55, 36, 75, 99, 40, 135, 110, 41, 60, 111, 80, 120, 62, 160, 134, 56, 141, 76, 112, 64, 78, 119, 113, 103, 183, 37, 167, 366, 73
OFFSET
1,2
COMMENTS
It is conjectured that this sequence is not only injective, but also surjective on N, i.e., that it is a true permutation of natural numbers.
See also comments in related A266121.
LINKS
Eric Angelini, a(n)*a(n+1) shows at least twice the same digit, Posting on SeqFan-list Dec 21 2015. [Source of inspiration for this sequence.]
EXAMPLE
For n=4, we start testing from the least so far unused number, which is 4, by multiplying it by a(3)*a(2) = 6. Because 6*4 = 24, which has two adjacent 1's in its binary representation "11000", 6 is disqualified. Next we try 5, and 6*5 = "11110", and 5 is also disqualified. Next we try 6, and 6*6 = "100100", with no adjacent 1's, and we have found the least unused number satisfying the required condition, thus we set a(4) = 6.
PROG
(Scheme, with defineperm1-macro from Antti Karttunen's IntSeq-library)
(defineperm1 (A266191 n) (cond ((<= n 3) n) (else (let ((prev1 (A266191 (- n 1))) (prev2 (A266191 (- n 2)))) (let loop ((k 1)) (cond ((and (not-lte? (A266192 k) (- n 1)) (isA003714? (* k prev1 prev2))) k) (else (loop (+ 1 k)))))))))
(define (isA003714? n) (= (* 3 n) (A003987bi n (* 2 n)))) ;; Where A003987bi implements bitwise-XOR (see A003987).
;; 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))))
CROSSREFS
Left inverse: A266192 (also the right inverse if this sequence is a permutation of natural numbers).
Cf. also A266117, A266121 and A266195 for similar permutations.
Sequence in context: A226615 A138608 A092283 * A273338 A099900 A193903
KEYWORD
nonn,base,changed
AUTHOR
Antti Karttunen, Dec 23 2015
STATUS
approved