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.

A228784 Permutation of the positive integers related to the "Sine tree" (see Comments lines for construction details).

This page as a plain text file.
%I A228784 #28 Jul 19 2021 01:20:52
%S A228784 1,3,2,4,8,9,5,7,10,18,16,37,21,15,43,75,33,36,20,14,11,19,17,34,38,
%T A228784 22,29,41,73,66,150,86,31,172,300,132,147,83,59,44,76,68,35,39,6,13,
%U A228784 79,71,136,152,88,119,167,295,264,600,344,62,173,301,133,146,82
%N A228784 Permutation of the positive integers related to the "Sine tree" (see Comments lines for construction details).
%C A228784 The "Sine tree" is constructed according to this procedure:
%C A228784    take an infinite complete binary tree,
%C A228784    initially, the nodes have no value,
%C A228784    for each n=1,2,3,...:
%C A228784       move to the root node,
%C A228784       while the current node has a value:
%C A228784          if sin(n)<sin(node.value) then move to the left child node,
%C A228784          else move to the right child node.
%C A228784       assign the value n to the current node.
%C A228784 As the set {sin(1), sin(2), sin(3), ...} is dense in the open interval ]-1, +1[, each node will eventually have a value.
%C A228784 a(n) corresponds to the "index" of the node with value n:
%C A228784 - the index of the root node is 1,
%C A228784 - the index of the left child of the node with index k is 2*k,
%C A228784 - the index of the right child of the node with index k is 2*k+1.
%C A228784 a(A046959(n)) = 2^(n-1)-1, for any n>1.
%C A228784 a(A046964(n)) = 2^(n-1), for any n>0.
%H A228784 Paul Tek, <a href="/A228784/b228784.txt">Table of n, a(n) for n = 1..10000</a>
%H A228784 Paul Tek, <a href="/A228784/a228784.png">The 7 first nodes of the Sine tree</a>
%H A228784 Paul Tek, <a href="/A228784/a228784.txt">Perl program for this sequence</a>
%H A228784 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A228784 For n=1: the root node has no value, so we assign it the value 1, and a(1)=1.
%e A228784 For n=2: the root node has value 1, and sin(2)>sin(1), so we move to the right child node. This node has no value, so we assign it the value 2, and a(2)=2*1+1.
%e A228784 For n=3: the root node has value 1, and sin(3)<sin(1), so we move to the left child node. This node has no value, so we assign it the value 3, and a(3)=2*1.
%o A228784 (Perl) See Links section.
%Y A228784 Cf. A046959, A046964, A229976.
%K A228784 nonn,look
%O A228784 1,2
%A A228784 _Paul Tek_, Oct 04 2013