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.

A269366 a(1) = 1, a(2n) = A269361(1+a(n)), a(2n+1) = A269363(a(n)).

This page as a plain text file.
%I A269366 #18 Dec 10 2019 12:10:10
%S A269366 1,2,3,4,6,5,7,8,12,16,15,9,11,10,22,13,24,18,38,40,48,33,46,20,14,32,
%T A269366 27,17,19,25,44,29,28,50,75,21,30,72,71,73,70,133,139,113,76,129,91,
%U A269366 42,35,36,23,37,54,45,51,26,43,49,39,82,62,128,107,80,56,53,83,114,140,109,214,52,59,34,47,149,150,141,123,221,111,121
%N A269366 a(1) = 1, a(2n) = A269361(1+a(n)), a(2n+1) = A269363(a(n)).
%C A269366 This sequence can be represented as a binary tree. Each left hand child is produced as A269361(1+n), and each right hand child as A269363(n), when the parent node contains n:
%C A269366                                     |
%C A269366                  ...................1...................
%C A269366                 2                                       3
%C A269366       4......../ \........6                   5......../ \........7
%C A269366      / \                 / \                 / \                 / \
%C A269366     /   \               /   \               /   \               /   \
%C A269366    /     \             /     \             /     \             /     \
%C A269366   8       12         16       15          9       11         10       22
%C A269366 13 24   18  38     40  48   33  46      20 14   32  27     17  19   25  44
%C A269366 etc.
%C A269366 An example of (suspected) "entanglement permutation" where the other pair of complementary sequences is generated by a greedy algorithm.
%C A269366 Sequence is not only injective, but also surjective on N (thus a permutation of natural numbers) provided that A269361 is surjective on A091072 and A269363 is surjective on A091067.
%H A269366 Antti Karttunen, <a href="/A269366/b269366.txt">Table of n, a(n) for n = 1..8192</a>
%H A269366 Antti Karttunen, <a href="/A135141/a135141.pdf">Entanglement Permutations</a>, 2016-2017
%H A269366 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%o A269366 (Scheme, with defineperm1-macro from _Antti Karttunen_'s IntSeq-library)
%o A269366 (defineperm1 (A269366 n) (cond ((= 1 n) n) ((even? n) (A269361 (+ 1 (A269366 (/ n 2))))) (else (A269363 (A269366 (/ (- n 1) 2))))))
%o A269366 (define (A269365 n) (A269366 (- n))) ;; The negative side gives the values for the inverse function (from the cache).
%o A269366 ;; We consider a > b (i.e. not less than b) also in case a is #f.
%o A269366 ;; (Because of the stateful caching system used by defineperm1-macro):
%o A269366 (define (not-lte? a b) (cond ((not (number? a)) #t) (else (> a b))))
%Y A269366 Left inverse: A269365 (also right inverse, if this sequence is a permutation of natural numbers).
%Y A269366 Cf. A091067, A091072, A269361, A269363, A269367, A266121.
%K A269366 nonn,look,tabf
%O A269366 1,2
%A A269366 _Antti Karttunen_, Feb 25 2016