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.

Showing 1-5 of 5 results.

A233276 a(0)=0, a(1)=1, after which a(2n) = A005187(1+a(n)), a(2n+1) = A055938(a(n)).

Original entry on oeis.org

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, 63, 62, 57, 61, 50, 55, 56, 60, 42, 45, 47, 51, 49, 52, 54, 59, 32, 33, 34, 36, 35, 37, 39, 43, 38, 40, 41, 44, 46, 48, 53, 58, 127, 126, 120
Offset: 0

Views

Author

Antti Karttunen, Dec 18 2013

Keywords

Comments

For all n, a(A000079(n)) = A000225(n+1), i.e. a(2^n) = (2^(n+1))-1.
For n>=1, a(A000225(n)) = A000325(n).
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.

Crossrefs

Inverse permutation: A233275.
Cf. also A070939 (the binary width of both n and a(n)).
Related arrays: A255555, A255557.
Similarly constructed permutation pairs: A005940/A156552, A135141/A227413, A232751/A232752, A233277/A233278, A233279/A233280, A003188/A006068.

Formula

a(0)=0, a(1)=1, and thereafter, a(2n) = A005187(1+a(n)), a(2n+1) = A055938(a(n)).
As a composition of related permutations:
a(n) = A233278(A054429(n)).

Extensions

Name changed and the illustration of binary tree added by Antti Karttunen, Apr 19 2015

A233278 a(0)=0, a(1)=1, after which a(2n) = A055938(a(n)), a(2n+1) = A005187(1+a(n)).

Original entry on oeis.org

0, 1, 2, 3, 5, 4, 6, 7, 12, 10, 9, 8, 13, 11, 14, 15, 27, 23, 21, 19, 20, 18, 17, 16, 28, 25, 24, 22, 29, 26, 30, 31, 58, 53, 48, 46, 44, 41, 40, 38, 43, 39, 37, 35, 36, 34, 33, 32, 59, 54, 52, 49, 51, 47, 45, 42, 60, 56, 55, 50, 61, 57, 62, 63, 121, 113, 108
Offset: 0

Views

Author

Antti Karttunen, Dec 18 2013

Keywords

Comments

This permutation is obtained by "entangling" even and odd numbers with complementary pair A055938 & A005187, meaning that it can be viewed as a binary tree. Each child to the left is obtained by applying A055938(n) to the parent node containing n, and each child to the right is obtained as A005187(n+1):
0
|
...................1...................
2 3
5......../ \........4 6......../ \........7
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
12 10 9 8 13 11 14 15
27 23 21 19 20 18 17 16 28 25 24 22 29 26 30 31
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 zero at the root 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 A233276 gives the mirror image of the same tree.

Crossrefs

Inverse permutation: A233277.
Cf. also A070939 (the binary width of both n and a(n)).
Related arrays: A255555, A255557.
Similarly constructed permutation pairs: A005940/A156552, A135141/A227413, A232751/A232752, A233275/A233276, A233279/A233280, A003188/A006068.

Formula

a(0)=0, a(1)=1, and thereafter, a(2n) = A055938(a(n)), a(2n+1) = A005187(1+a(n)).
As a composition of related permutations:
a(n) = A233276(A054429(n)).

Extensions

Name changed and the illustration of binary tree added by Antti Karttunen, Apr 19 2015

A256991 If A079559(n) = 1, a(n) = A213714(n) - 1, otherwise a(n) = A234017(n).

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 5, 6, 7, 7, 8, 8, 9, 10, 9, 10, 11, 12, 11, 13, 14, 12, 13, 14, 15, 15, 16, 16, 17, 18, 17, 18, 19, 20, 19, 21, 22, 20, 21, 22, 23, 24, 23, 25, 26, 24, 25, 27, 28, 26, 29, 30, 27, 28, 29, 30, 31, 31, 32, 32, 33, 34, 33, 34, 35, 36, 35, 37, 38, 36, 37, 38, 39, 40, 39, 41, 42, 40, 41, 43, 44, 42
Offset: 1

Views

Author

Antti Karttunen, Apr 15 2015

Keywords

Comments

In other words, if n = A005187(k) for some k >= 1, then a(n) = k-1, otherwise it must be that n = A055938(h) for some h, and then a(n) = h.
In binary trees like A233276 and A233278, a(n) gives the contents at the parent node of node containing n, for any n >= 1.
When iterating a(n), a(a(n)), a(a(a(n))), and so on, A070939(n) = A256478(n) + A256479(n) = A257248(n) + A257249(n) gives the number of steps needed to reach zero, from any starting value n >= 1.

Crossrefs

Programs

Formula

If A079559(n) = 1, a(n) = A213714(n) - 1, otherwise a(n) = A234017(n).
a(n) = A256992(n) - A079559(n) = A213714(n) + A234017(n) - A079559(n).

A256478 a(0) = 0; and for n >= 1, if A079559(n) = 1, then a(n) = 1 + a(A213714(n)-1), otherwise a(n) = a(A234017(n)).

Original entry on oeis.org

0, 1, 1, 2, 2, 1, 2, 3, 3, 2, 2, 3, 1, 2, 3, 4, 4, 3, 3, 3, 2, 2, 4, 2, 3, 3, 4, 1, 2, 3, 4, 5, 5, 4, 4, 4, 3, 3, 4, 3, 3, 3, 5, 2, 2, 4, 3, 4, 2, 4, 5, 3, 3, 2, 3, 4, 4, 5, 1, 2, 3, 4, 5, 6, 6, 5, 5, 5, 4, 4, 5, 4, 4, 4, 5, 3, 3, 4, 4, 4, 3, 4, 6, 3, 3, 3, 3, 5, 5, 4, 2, 2, 4, 3, 5, 3, 4, 5, 6, 2, 4, 4, 4, 5, 3, 4, 3, 3, 2, 5, 5, 3, 6, 2, 4, 4, 3, 4, 5, 5, 6, 1, 2, 3, 4, 5, 6, 7, 7
Offset: 0

Views

Author

Antti Karttunen, Apr 15 2015

Keywords

Comments

a(n) tells how many nonzero terms of A005187 are encountered when traversing toward the root of binary tree A233276, starting from the node containing n. This count includes both n (in case it is a term of A005187) and 1 (but not 0). See also comments in A256479 and A256991.
The 1's (seem to) occur at positions given by A000325.

Crossrefs

Formula

a(0) = 0; and for n >= 1, if A079559(n) = 1, then a(n) = 1 + a(A213714(n)-1), otherwise a(n) = a(A234017(n)).
a(n) = A000120(A233277(n)). [Binary weight of A233277(n).]
Other identities and observations. For all n >= 1:
a(n) = 1 + A257248(n) = 1 + A080791(A233275(n)).
a(n) = A070939(n) - A256479(n).
a(n) >= A255559(n).

A257249 a(0) = 1, and for n >= 1, if A079559(n) = 0, then a(n) = 1 + a(A234017(n)), otherwise a(n) = a(A213714(n)-1).

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 2, 1, 2, 3, 3, 2, 4, 3, 2, 1, 2, 3, 3, 3, 4, 4, 2, 4, 3, 3, 2, 5, 4, 3, 2, 1, 2, 3, 3, 3, 4, 4, 3, 4, 4, 4, 2, 5, 5, 3, 4, 3, 5, 3, 2, 4, 4, 5, 4, 3, 3, 2, 6, 5, 4, 3, 2, 1, 2, 3, 3, 3, 4, 4, 3, 4, 4, 4, 3, 5, 5, 4, 4, 4, 5, 4, 2, 5, 5, 5, 5, 3, 3, 4, 6, 6, 4, 5, 3, 5, 4, 3, 2, 6, 4, 4, 4, 3, 5, 4, 5, 5, 6, 3, 3, 5, 2, 6, 4, 4, 5, 4, 3, 3, 2, 7, 6, 5, 4, 3, 2, 1, 2
Offset: 0

Views

Author

Antti Karttunen, Apr 19 2015

Keywords

Comments

Because A233275(n) = A003188(n) for n = 1 .. 9, a(n) = A005811(n) for n = 1 .. 9.

Crossrefs

Formula

a(0) = 1, and for n >= 1, if A079559(n) = 0, then a(n) = 1 + a(A234017(n)), otherwise a(n) = a(A213714(n)-1).
Other identities. For all n >= 1:
a(n) = A070939(n) - A257248(n).
a(n) = A000120(A233275(n)). [Binary weight of A233275(n).]
a(n) = 1 + A256479(n) = 1 + A080791(A233277(n)).
Showing 1-5 of 5 results.