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”).
%I #15 Dec 23 2024 14:53:44
%S 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,
%T 27,38,17,54,47,34,44,51,33,88,30,32,43,48,21,86,23,42,35,46,84,70,91,
%U 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
%N 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.
%C 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.
%C See also comments in related A266121.
%H Antti Karttunen, <a href="/A266191/b266191.txt">Table of n, a(n) for n = 1..12000</a>
%H Eric Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2015-December/015890.html">a(n)*a(n+1) shows at least twice the same digit</a>, Posting on SeqFan-list Dec 21 2015. [Source of inspiration for this sequence.]
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e 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.
%o (Scheme, with defineperm1-macro from _Antti Karttunen_'s IntSeq-library)
%o (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)))))))))
%o (define (isA003714? n) (= (* 3 n) (A003987bi n (* 2 n)))) ;; Where A003987bi implements bitwise-XOR (see A003987).
%o ;; We consider a > b (i.e., not less than b) also in case a is #f.
%o ;; (Because of the stateful caching system used by defineperm1-macro):
%o (define (not-lte? a b) (cond ((not (number? a)) #t) (else (> a b))))
%Y Left inverse: A266192 (also the right inverse if this sequence is a permutation of natural numbers).
%Y Cf. A003714, A003987.
%Y Cf. also A266117, A266121 and A266195 for similar permutations.
%K nonn,base
%O 1,2
%A _Antti Karttunen_, Dec 23 2015