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.
%I A344792 #59 Apr 14 2022 08:01:14 %S A344792 1,4,2,6,10,3,13,9,22,15,121,7,5,67,20,31,14,33,76,34,23,409,182,16, %T A344792 11,40,8,151,101,30,46,70,47,21,49,112,50,114,172,51,175,52,35,1381, %U A344792 614,273,616,24,37,25,17,60,91,12,19,340,227,769,152,45,103,69,157 %N A344792 a(n) is half the n-th term of a truncated sesquinary (base 3/2) tree. %C A344792 The tree is created by planting a tree with alternating branching and nonbranching nodes (as described in A005428). The nodes are then labeled in order -- 1,2,3,4,... All odd nodes are removed, leaving an infinite binary tree of every even number. Finally, each node is divided by two. The first four rows of the resultant tree are as follows: %C A344792 1 %C A344792 4 2 %C A344792 6 10 3 13 %C A344792 9 22 15 121 7 5 67 20 %C A344792 ... %C A344792 The first number of the n-th row, a(2^(n-1)), is A081614(n). The last number of the n-th row is A182459(n). The lowest number of the n-th row is A061419(n). It appears that when n is even, A189706(a(n)+1) = 0, and when n is odd A189706(a(n)+1) = 1. This is true for at least the first n = 1 through 40000. %H A344792 Alois P. Heinz, <a href="/A344792/b344792.txt">Table of n, a(n) for n = 1..10000</a> %H A344792 John-Vincent Saddic, <a href="/A344792/a344792.java.txt">Java code to produce the first n lines of the tree</a> %H A344792 John-Vincent Saddic, <a href="/A344792/a344792_1.png">Diagram to construct the tree</a> %H A344792 John-Vincent Saddic, <a href="/A344792/a344792_2.png">Log/log scatterplot</a> %H A344792 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %p A344792 a:= proc(n) option remember; %p A344792 a(iquo(n, 2))*3 + irem(n, 2); %p A344792 while %::odd do ceil(% * 3/2) od; %/2 %p A344792 end: a(1):=1: %p A344792 seq(a(n), n=1..63); # _Alois P. Heinz_, May 29 2021 %t A344792 a[n_] := a[n] = Module[{t}, t = a[Quotient[n, 2]]*3 + Mod[n, 2]; %t A344792 While[OddQ[t], t = Ceiling[t * 3/2] ]; t/2]; a[1] = 1; %t A344792 Table[a[n], {n, 1, 63}] (* _Jean-François Alcover_, Apr 14 2022, after _Alois P. Heinz_ *) %o A344792 (Java) See Links. %o A344792 (PARI) a(n) = my(t=1); forstep(i=logint(n,2)-1,0,-1, t=3*t+1+bittest(n,i); my(k=valuation(t,2)); t=(t*3^k)>>(k+1)); t; \\ _Kevin Ryde_, May 29 2021 %Y A344792 Inverse is A345671. %Y A344792 Cf. A005428, A081614, A182459, A061419, A189706. %K A344792 nonn,look %O A344792 1,2 %A A344792 _John-Vincent Saddic_, May 28 2021