OFFSET
0,3
COMMENTS
This permutation is obtained by "entangling" even and odd numbers with complementary pair A005187 & A055938, meaning that it can be viewed as a binary tree. Each child to the left is obtained by applying A005187(n+1) to the parent node containing n, and each child to the right is obtained as A055938(n):
0
|
...................1...................
3 2
7......../ \........6 4......../ \........5
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
15 14 11 13 8 9 10 12
31 30 26 29 22 24 25 28 16 17 18 20 19 21 23 27
etc.
For n >= 1, A256991(n) gives the contents of the immediate parent node of the node containing n, while A070939(n) gives the total distance to 0 from the node containing n, with A256478(n) telling how many of the terms encountered on that journey are terms of A005187 (including the penultimate 1 but not the final 0 in the count), while A256479(n) tells how many of them are terms of A055938.
Permutation A233278 gives the mirror image of the same tree.
LINKS
FORMULA
PROG
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Dec 18 2013
EXTENSIONS
Name changed and the illustration of binary tree added by Antti Karttunen, Apr 19 2015
STATUS
approved