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 A257798 #16 May 24 2015 13:38:23 %S A257798 1,2,3,4,6,5,10,7,15,9,28,8,21,14,66,11,36,20,136,13,55,35,435,12,45, %T A257798 27,253,19,120,77,2278,16,78,44,703,26,231,152,9453,18,105,65,1596,43, %U A257798 666,464,95266,17,91,54,1081,34,406,275,32385,25,210,135,7381,89,3081,2345,2598060,22,153,90,3160,53,1035,740,248160,33 %N A257798 Permutation of natural numbers: a(1) = 1; a(2n) = nontriangular(a(n)), a(2n+1) = triangular(1+a(n)), where triangular = A000217, nontriangular = A014132. %C A257798 This sequence can be represented as a binary tree. Each left hand child is produced as A014132(n) and each right hand child as A000217(1+n), when a parent contains n >= 1: %C A257798 1 %C A257798 ................../ \.................. %C A257798 2 3 %C A257798 4......../ \........6 5......../ \.......10 %C A257798 / \ / \ / \ / \ %C A257798 / \ / \ / \ / \ %C A257798 / \ / \ / \ / \ %C A257798 7 15 9 28 8 21 14 66 %C A257798 11 36 20 136 13 55 35 435 12 45 27 253 19 120 77 2278 %C A257798 etc. %H A257798 Antti Karttunen, <a href="/A257798/b257798.txt">Table of n, a(n) for n = 1..1024</a> %H A257798 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A257798 a(1)=1; after which: a(2n) = A014132(a(n)), a(2n+1) = A000217(a(n)+1). %o A257798 (Scheme, with memoizing definec-macro) %o A257798 (definec (A257798 n) (cond ((<= n 1) n) ((even? n) (A014132 (A257798 (/ n 2)))) (else (A000217 (+ 1 (A257798 (/ (- n 1) 2))))))) %Y A257798 Inverse: A257797. %Y A257798 Cf. A000217, A014132. %Y A257798 Cf. also permutation A183079. %K A257798 nonn %O A257798 1,2 %A A257798 _Antti Karttunen_, May 18 2015