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.

A285112 Permutation of natural numbers: a(0) = 1, a(1) = 2, a(2n) = A005117(1+a(n)), a(2n+1) = A065642(a(n)).

This page as a plain text file.
%I A285112 #8 Apr 17 2017 09:02:31
%S A285112 1,2,3,4,5,9,6,8,7,25,14,27,10,12,13,16,11,49,39,125,22,28,42,81,15,
%T A285112 20,19,18,21,169,26,32,17,121,79,343,65,117,205,625,35,44,43,56,69,84,
%U A285112 133,243,23,45,33,40,31,361,30,24,34,63,277,2197,41,52,53,64,29,289,199,1331,130,6241,563,2401,106,325,193,351,335,1025,1030,3125,58
%N A285112 Permutation of natural numbers: a(0) = 1, a(1) = 2, a(2n) = A005117(1+a(n)), a(2n+1) = A065642(a(n)).
%C A285112 Note the indexing: the domain starts from 0, while the range excludes zero.
%C A285112 This sequence can be represented as a binary tree. Each left hand child is produced as A005117(1+n), and each right hand child as A065642(n), when the parent node contains n >= 2:
%C A285112                                     1
%C A285112                                     |
%C A285112                  ...................2...................
%C A285112                 3                                       4
%C A285112       5......../ \........9                   6......../ \........8
%C A285112      / \                 / \                 / \                 / \
%C A285112     /   \               /   \               /   \               /   \
%C A285112    /     \             /     \             /     \             /     \
%C A285112   7       25         14       27         10       12         13       16
%C A285112 11 49   39  125    22  28   42  81     15  20   19  18     21  169  26  32
%C A285112 etc.
%H A285112 Antti Karttunen, <a href="/A285112/b285112.txt">Table of n, a(n) for n = 0..116</a>
%H A285112 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A285112 a(0) = 1, a(1) = 2, a(2n) = A005117(1+a(n)), a(2n+1) = A065642(a(n)).
%o A285112 (Scheme, with memoization-macro definec)
%o A285112 (definec (A285112 n) (cond ((<= n 1) (+ n 1)) ((even? n) (A005117 (+ 1 (A285112 (/ n 2))))) (else (A065642 (A285112 (/ (- n 1) 2))))))
%Y A285112 Inverse: A285111.
%Y A285112 Cf. A005117, A065642.
%Y A285112 Similar or related permutations: A243344, A243346, A252753, A277696, A284572.
%Y A285112 Cf. also arrays A284457 & A284311.
%K A285112 nonn,tabf
%O A285112 0,2
%A A285112 _Antti Karttunen_, Apr 17 2017