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.

A257726 a(0)=0; a(2n) = unlucky(a(n)), a(2n+1) = lucky(a(n)+1), where lucky = A000959, unlucky = A050505.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 5, 9, 6, 13, 11, 25, 8, 15, 14, 33, 10, 21, 19, 51, 17, 43, 35, 115, 12, 31, 22, 67, 20, 63, 45, 163, 16, 37, 29, 93, 27, 79, 66, 273, 24, 73, 57, 223, 47, 171, 146, 723, 18, 49, 42, 151, 30, 99, 88, 385, 28, 87, 83, 349, 59, 235, 203, 1093, 23, 69, 50, 193, 40, 135, 119, 559, 38, 129, 102, 475, 86, 367, 335, 1983, 34, 111
Offset: 0

Views

Author

Antti Karttunen, May 06 2015

Keywords

Comments

This sequence can be represented as a binary tree. Each left hand child is produced as A050505(n), and each right hand child as A000959(1+n), when a parent contains n >= 1:
0
|
...................1...................
2 3
4......../ \........7 5......../ \........9
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
6 13 11 25 8 15 14 33
10 21 19 51 17 43 35 115 12 31 22 67 20 63 45 163
etc.
Because all lucky numbers are odd, it means that even terms can only occur in even positions (together with odd unlucky numbers, for each one of which there is a separate infinite cycle), while terms in odd positions are all odd.

Crossrefs

Inverse: A257725.
Related or similar permutations: A237126, A246378, A257728, A257731, A257733, A257801.
Cf. also A183089 (another similar permutation, but with a slightly different definition, resulting the first differing term at n=9, where a(9) = 13, while A183089(9) = 21).
Cf. also A257735 - A257738.

Formula

a(0)=0; after which, a(2n) = A050505(a(n)), a(2n+1) = A000959(a(n)+1).
As a composition of other permutations. For all n >= 1:
a(n) = A257731(A246378(n)).
a(n) = A257733(A237126(n)).
a(n) = A257801(A257728(n)).