cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

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