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.

A183089 Tree generated by the lucky numbers: a(1) = 1; a(2n) = unlucky(a(n)), a(2n+1) = lucky(a(n+1)), where lucky = A000959, unlucky = A050505.

This page as a plain text file.
%I A183089 #25 Sep 09 2017 19:39:09
%S A183089 1,2,3,4,7,5,9,6,21,11,13,8,31,14,15,10,87,29,37,17,49,19,25,12,141,
%T A183089 42,51,20,63,22,33,16,517,112,133,40,189,50,69,24,259,64,75,27,111,35,
%U A183089 43,18,925,177,211,56,267,66,79,28,339,83,93,30,159,45,67,23,4129,618,685,143,855,167,201,54,1275,234,261,65,391,90,105,34
%N A183089 Tree generated by the lucky numbers: a(1) = 1; a(2n) = unlucky(a(n)), a(2n+1) = lucky(a(n+1)), where lucky = A000959, unlucky = A050505.
%C A183089 A permutation of the positive integers. See the comment at A183079.
%H A183089 Antti Karttunen, <a href="/A183089/b183089.txt">Table of n, a(n) for n = 1..512</a>
%H A183089 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A183089 Let L(n) = A000959(n), the n-th lucky number.
%F A183089 Let U(n) = A050505(n), the n-th unlucky numbers.
%F A183089 The tree-array T(n,k) is then given by rows:
%F A183089 T(0,0) = 1; T(1,0) = 2;
%F A183089 T(n,2j) = L(T(n-1),j);
%F A183089 T(n,2j+1) = U(T(n-1),j);
%F A183089 for j = 0, 1, ..., 2^(n-1) - 1, n >= 2.
%F A183089 a(1) = 1; a(2n) = A050505(a(n)), a(2n+1) = A000959(a(n+1)). - _Antti Karttunen_, May 09 2015
%e A183089 Top 6 levels of the binary tree:
%e A183089                                      1
%e A183089                                      |
%e A183089                   ...................2...................
%e A183089                  3                                       4
%e A183089        7......../ \........5                   9......../ \........6
%e A183089       / \                 / \                 / \                 / \
%e A183089      /   \               /   \               /   \               /   \
%e A183089     /     \             /     \             /     \             /     \
%e A183089   21       11         13       8          31       14         15       10
%e A183089 87  29   37  17     49  19   25 12     141  42   51  20     63  22   33  16
%e A183089 ...
%e A183089 From the level 3 to the level 4: 3 --> (7,5) and 4 --> (9,6).
%o A183089 (Scheme, with memoizing definec-macro)
%o A183089 (definec (A183089 n) (cond ((<= n 1) n) ((even? n) (A050505 (A183089 (/ n 2)))) (else (A000959 (A183089 (/ (+ n 1) 2))))))
%o A183089 ;; _Antti Karttunen_, May 09 2015
%Y A183089 Inverse permutation: A257690.
%Y A183089 Cf. A000959, A050505.
%Y A183089 Cf. A257726 (similar permutation with a slightly different definition, resulting the first differing term at n=9, where a(9) = 21, while A257726(9) = 13), A257735 - A257738.
%Y A183089 Cf. A183079, A237739 (other similar permutations).
%K A183089 nonn,tabf
%O A183089 1,2
%A A183089 _Clark Kimberling_, Dec 24 2010
%E A183089 Added a formula to the Name field and more terms, edited Example section - _Antti Karttunen_, May 09 2015