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.

A266351 Start with a(1) = 1, then always choose for a(n) the least unused number such that A057889(a(n)*a(n-1)) = A057889(a(n)) * A057889(a(n-1)), where A057889 is a bijective base-2 reverse.

This page as a plain text file.
%I A266351 #21 Jan 02 2016 04:14:23
%S A266351 1,2,3,4,5,6,7,8,9,10,12,14,16,11,17,13,32,15,24,18,20,19,33,21,36,28,
%T A266351 27,56,34,22,64,23,65,25,40,35,72,42,48,30,51,60,66,26,68,37,96,31,99,
%U A266351 62,128,29,129,38,80,49,73,70,130,39,256,41,131,74,136,44,132,46,257,43,258,45,260,47,512,50,133,76,160,67,84,97,137,112,54
%N A266351 Start with a(1) = 1, then always choose for a(n) the least unused number such that A057889(a(n)*a(n-1)) = A057889(a(n)) * A057889(a(n-1)), where A057889 is a bijective base-2 reverse.
%C A266351 Equally: always choose for a(n) the least unused number such that a(n)*a(n-1) = A057889(A057889(a(n)) * A057889(a(n-1))).
%C A266351 Note that the adjacent terms of permutation A266195 satisfy the same condition, except that permutation is not the lexicographically earliest sequence of this kind (because it has a more restrictive condition). See A266194.
%C A266351 This is a bijection for the same reason that A266195 is. Any high enough 2^k will always save the permutation of being stuck, and will also immediately pick up as its succeeding pair the least term unused so far.
%H A266351 Antti Karttunen, <a href="/A266351/b266351.txt">Table of n, a(n) for n = 1..1450</a>
%H A266351 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%o A266351 (Scheme, with defineperm1-macro from Antti Karttunen's IntSeq-library)
%o A266351 (defineperm1 (A266351 n) (cond ((= 1 n) n) (else (let ((prev (A266351 (- n 1)))) (let loop ((k 1)) (cond ((and (not-lte? (A266352 k) (- n 1)) (= (A057889 (* k prev)) (* (A057889 k) (A057889 prev)))) k) (else (loop (+ 1 k)))))))))
%o A266351 ;; We consider a > b (i.e. not less than b) also in case a is #f.
%o A266351 ;; (Because of the stateful caching system used by defineperm1-macro):
%o A266351 (define (not-lte? a b) (cond ((not (number? a)) #t) (else (> a b))))
%Y A266351 Inverse: A266352.
%Y A266351 Cf. A057889, A266194.
%Y A266351 Cf. A266195, A265405, A266405 (similar sequences).
%K A266351 nonn,base
%O A266351 1,2
%A A266351 _Antti Karttunen_, Dec 28 2015