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.

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

This page as a plain text file.
%I A284572 #10 Apr 17 2017 09:02:03
%S A284572 1,2,4,3,9,6,25,5,8,14,20,10,49,39,52,7,12,13,27,22,45,33,63,15,121,
%T A284572 79,80,65,50,85,2809,11,16,19,169,21,28,42,56,35,529,73,92,55,68,103,
%U A284572 128,23,32,199,244,130,100,131,243,106,132,82,153,139,172,4619,5620,17,18,26,289,31,40,277,340,34,44,43,841,69,1849,91,171,58,48
%N A284572 Permutation of natural numbers: a(1) = 1, a(2n) = A005117(1+a(n)), a(2n+1) = A065642(1+a(n)).
%C A284572 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(1+n), when the parent node contains n:
%C A284572                                     1
%C A284572                  ................../ \..................
%C A284572                 2                                       4
%C A284572       3......../ \........9                   6......../ \........25
%C A284572      / \                 / \                 / \                 / \
%C A284572     /   \               /   \               /   \               /   \
%C A284572    /     \             /     \             /     \             /     \
%C A284572   5       8          14       20         10       49         39       52
%C A284572 7  12   13 27      22  45   33  63     15  121  79  80     65  50   85 2809
%C A284572 etc.
%C A284572 Compare to A285112.
%H A284572 Antti Karttunen, <a href="/A284572/b284572.txt">Table of n, a(n) for n = 1..166</a>
%H A284572 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A284572 a(1) = 1, a(2n) = A005117(1+a(n)), a(2n+1) = A065642(1+a(n)).
%o A284572 (Scheme, with memoization-macro definec)
%o A284572 (definec (A284572 n) (cond ((= 1 n) n) ((even? n) (A005117 (+ 1 (A284572 (/ n 2))))) (else (A065642 (+ 1 (A284572 (/ (- n 1) 2)))))))
%Y A284572 Inverse: A284571.
%Y A284572 Cf. A005117, A065642.
%Y A284572 Similar or related permutations: A243344, A243346, A277696, A285112.
%K A284572 nonn,tabf
%O A284572 1,2
%A A284572 _Antti Karttunen_, Apr 17 2017