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-8 of 8 results.

A257806 a(n) = A257808(n) - A257807(n).

Original entry on oeis.org

0, -1, 0, 1, 0, 1, 2, 1, 2, 1, 2, 3, 2, 3, 4, 5, 6, 5, 4, 5, 6, 5, 6, 5, 4, 3, 4, 3, 4, 5, 4, 5, 6, 7, 6, 5, 6, 7, 6, 7, 8, 7, 6, 7, 8, 9, 10, 11, 12, 11, 12, 13, 12, 11, 10, 9, 10, 9, 10, 11, 10, 11, 12, 13, 12, 11, 12, 13, 12, 13, 12, 13, 14, 13, 12, 11, 10, 9, 10, 11, 12, 11, 10, 9, 10, 11, 12, 13, 14, 15, 14, 15, 16, 15, 16, 15, 14
Offset: 0

Views

Author

Antti Karttunen, May 12 2015

Keywords

Comments

Alternative description: Start with a(0) = 0, and then to obtain each a(n), look at each successive term in the infinite trunk of inverted binary beanstalk, from A233271(1) onward, subtracting one from a(n-1) if A233271(n) is odd, and adding one to a(n-1) if A233271(n) is even.
In other words, starting from zero, iterate the map x -> {x + 1 + number of nonleading zeros in the binary representation of x}, and note each time whether the result is odd or even: With odd results go one step down, and even results go one step up.
After the zeros at a(0), a(2) and a(4) and -1 at a(1), the terms stay strictly positive for a long time, although from the terms of A257805 it can be seen that the sequence must again fall to the negative side somewhere between n = 541110611 and n = 1051158027 (i.e., A218600(33) .. A218600(34)). Indeed the fourth zero occurs at n = 671605896, and the second negative term right after that as a(671605897) = -1.
The maximum positive value reached prior to the slide into negative territory is 2614822 for a(278998626) and a(278998628). - Hans Havermann, May 23 2015

Examples

			We consider 0 to have no nonleading zeros, so first we get to 0 -> 0+1+0 = 1, and 1 is odd, so we go one step down from the starting value a(0)=0, and thus a(1) = -1.
1 has no nonleading zeros, so we get 1 -> 1+1+0 = 2, and 2 is even, so we go one step up, and thus a(2) = 0.
2 has one nonleading zero in binary "10", so we get 2 -> 2+1+1 = 4, and 4 is also even, so we go one step up, and thus a(3) = 1.
4 has two nonleading zeros in binary "100", so we get 4 -> 4+2+1 = 7, 7 is odd, so we go one step down, and thus a(4) = 0.
		

Crossrefs

Cf. also A218542, A218543, A218789 and A233270 (compare the scatter plots).

Programs

Formula

a(n) = A257808(n) - A257807(n).
a(0) = 0; and for n >= 1, a(n) = a(n-1) + (-1)^A233271(n).
Other identities. For all n >= 0:
a(A218600(n+1)) = -A257805(n).

A257804 Positions of even numbers in A233271, the infinite trunk of inverted binary beanstalk.

Original entry on oeis.org

0, 2, 3, 5, 6, 8, 10, 11, 13, 14, 15, 16, 19, 20, 22, 26, 28, 29, 31, 32, 33, 36, 37, 39, 40, 43, 44, 45, 46, 47, 48, 50, 51, 56, 58, 59, 61, 62, 63, 66, 67, 69, 71, 72, 78, 79, 80, 84, 85, 86, 87, 88, 89, 91, 92, 94, 97, 98, 99, 100, 101, 102, 104, 105, 110, 112, 113, 115, 116, 117, 120, 121, 123, 124, 125, 126, 129, 130
Offset: 0

Views

Author

Antti Karttunen, May 12 2015

Keywords

Comments

We start indexing of this sequence from 0, because a(0) = 0 is a special case, which can be conveniently ignored by considering only the terms from a(1) onward.

Crossrefs

Complement: A257803.

Formula

Other identities. For all n >= 0:
A257808(a(n)) = n. [A257808 works as a left inverse for this injective function.]

A257807 a(n) = number of odd numbers in range 0 .. n of A233271, the infinite trunk of inverted binary beanstalk.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 12 2015

Keywords

Comments

a(0) = 0; and for n >= 1: a(n) = the largest number k such that A257803(k) <= n.

Crossrefs

Partial sums of A257800.

Formula

a(0) = 0; for n >= 1, a(n) = A257800(n) + a(n-1).
Other identities:
For all n >= 0, a(n) = A257808(n) - A257806(n).
For all n >= 1, a(A257803(n)) = n. [This sequence works as a left inverse of injection A257803.]

A260430 Involution of natural numbers: a(1) = 1, a(A257803(1+n)) = A257804(a(n)), a(A257804(n)) = A257803(1+a(n)), where A257803 and A257804 give the positions of odd and even terms in A233271, the infinite trunk of inverted binary beanstalk.

Original entry on oeis.org

1, 4, 12, 2, 30, 7, 6, 74, 19, 21, 18, 3, 172, 52, 54, 49, 48, 11, 9, 383, 10, 128, 125, 32, 36, 132, 31, 119, 118, 5, 27, 24, 812, 314, 89, 25, 283, 92, 275, 76, 86, 85, 83, 290, 75, 267, 266, 17, 16, 68, 60, 14, 724, 15, 227, 1675, 219, 659, 207, 51, 64, 599, 216, 61, 232, 583, 174, 50, 204, 210, 201, 193, 208, 8, 45, 40, 1574, 612, 173, 569, 595, 159, 43
Offset: 1

Views

Author

Antti Karttunen, Jul 27 2015

Keywords

Crossrefs

Cf. also A233271, A257806.
Related permutations: A260431 - A260434.

Formula

a(1) = 1; for n > 1, if A257800(n) = 0 [when n is one of the terms of A257804] a(n) = A257803(1+a(A257808(n))), otherwise [when n is one of the terms of A257803] a(n) = A257804(a(A257807(n)-1)).

A260431 Permutation of natural numbers: a(1) = 1, a(A257804(n)) = 2*a(n), a(A257803(1+n)) = 1 + 2*a(n), where A257804 and A257803 give the positions of even and odd terms in A233271, the infinite trunk of inverted binary beanstalk.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 5, 16, 9, 12, 10, 7, 32, 18, 24, 20, 17, 13, 14, 64, 11, 36, 33, 19, 25, 48, 21, 40, 34, 15, 26, 28, 128, 65, 37, 22, 72, 49, 66, 38, 41, 35, 50, 96, 42, 80, 68, 30, 27, 52, 56, 29, 129, 23, 73, 256, 67, 130, 74, 39, 44, 144, 98, 51, 97, 132, 76, 43, 82, 81, 70, 100, 69, 31, 53, 57, 257, 192, 84, 160, 131, 75, 45, 136, 60, 54
Offset: 1

Views

Author

Antti Karttunen, Jul 27 2015

Keywords

Crossrefs

Inverse: A260432.
Related permutations: A260433, A260430, A054429.
Cf. also A257806.

Formula

a(1) = 1; for n > 1, if A257800(n) = 0 [when n is one of the terms of A257804] a(n) = 2*a(A257808(n)), otherwise [when n is one of the terms of A257803] a(n) = 1 + 2*a(A257807(n)-1).
As a composition of other permutations:
a(n) = A054429(A260433(n)).
a(n) = A260433(A260430(n)).

A260432 Permutation of natural numbers: a(1) = 1, a(2n) = A257804(a(n)), a(2n+1) = A257803(1+a(n)), where A257804 and A257803 give the positions of even and odd terms in A233271, the infinite trunk of inverted binary beanstalk.

Original entry on oeis.org

1, 2, 4, 3, 7, 6, 12, 5, 9, 11, 21, 10, 18, 19, 30, 8, 17, 14, 24, 16, 27, 36, 54, 15, 25, 31, 49, 32, 52, 48, 74, 13, 23, 29, 42, 22, 35, 40, 60, 28, 41, 45, 68, 61, 83, 92, 132, 26, 38, 43, 64, 50, 75, 86, 119, 51, 76, 89, 128, 85, 118, 125, 172, 20, 34, 39, 57, 47, 73, 71, 106, 37, 55, 59, 82, 67, 96, 101, 140, 46, 70, 69
Offset: 1

Views

Author

Antti Karttunen, Jul 27 2015

Keywords

Comments

This sequence can be represented as a binary tree. Each left hand child is produced as A257804(n), and each right hand child as A257803(1+n), when the parent contains n:
|
...................1...................
2 4
3......../ \........7 6......../ \........12
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
5 9 11 21 10 18 19 30
8 17 14 24 16 27 36 54 15 25 31 49 32 52 48 74
etc.

Crossrefs

Inverse: A260431.
Related permutations: A260434, A260430, A054429.
Cf. also A233271, A257806.

Formula

a(1) = 1, a(2n) = A257804(a(n)), a(2n+1) = A257803(1+a(n)).
As a composition of other permutations:
a(n) = A260434(A054429(n)).
a(n) = A260430(A260434(n)).

A260434 Permutation of natural numbers: a(1) = 1, a(2n) = A257803(1+a(n)), a(2n+1) = A257804(a(n)), where A257803 and A257804 give the positions of odd and even terms in A233271, the infinite trunk of inverted binary beanstalk.

Original entry on oeis.org

1, 4, 2, 12, 6, 7, 3, 30, 19, 18, 10, 21, 11, 9, 5, 74, 48, 52, 32, 49, 31, 25, 15, 54, 36, 27, 16, 24, 14, 17, 8, 172, 125, 118, 85, 128, 89, 76, 51, 119, 86, 75, 50, 64, 43, 38, 26, 132, 92, 83, 61, 68, 45, 41, 28, 60, 40, 35, 22, 42, 29, 23, 13, 383, 314, 275, 219, 266, 208, 201, 152, 283, 227, 207, 159, 174, 129, 127, 88
Offset: 1

Views

Author

Antti Karttunen, Jul 27 2015

Keywords

Comments

This sequence can be represented as a binary tree. Each left hand child is produced as A257803(1+n), and each right hand child as A257804(n), when the parent contains n:
|
...................1...................
4 2
12......../ \........6 7......../ \........3
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
30 19 18 10 21 11 9 5
74 48 52 32 49 31 25 15 54 36 27 16 24 14 17 8
etc.
Note how this is a mirror image of the tree shown in A260432.

Crossrefs

Inverse: A260433.
Related permutations: A260432, A260430, A054429.
Cf. also A233271, A257806.

Formula

a(1) = 1, a(2n) = A257803(1+a(n)), a(2n+1) = A257804(a(n)).
As a composition of other permutations:
a(n) = A260432(A054429(n)).
a(n) = A260430(A260432(n)).

A260433 Permutation of natural numbers: a(1) = 1, a(A257803(1+n)) = 2*a(n), a(A257804(n)) = 1 + 2*a(n), where A257803 and A257804 give the positions of odd and even terms in A233271, the infinite trunk of inverted binary beanstalk.

Original entry on oeis.org

1, 3, 7, 2, 15, 5, 6, 31, 14, 11, 13, 4, 63, 29, 23, 27, 30, 10, 9, 127, 12, 59, 62, 28, 22, 47, 26, 55, 61, 8, 21, 19, 255, 126, 58, 25, 119, 46, 125, 57, 54, 60, 45, 95, 53, 111, 123, 17, 20, 43, 39, 18, 254, 24, 118, 511, 124, 253, 117, 56, 51, 239, 93, 44, 94, 251, 115, 52, 109, 110, 121, 91, 122, 16, 42, 38, 510, 191, 107, 223, 252, 116, 50, 247, 35, 41
Offset: 1

Views

Author

Antti Karttunen, Jul 27 2015

Keywords

Crossrefs

Inverse: A260434.
Related permutations: A260431, A260430, A054429.
Cf. also A233271, A257806.

Formula

a(1) = 1; for n > 1, if A257800(n) = 0 [when n is one of the terms of A257804] a(n) = 1 + 2*a(A257808(n)), otherwise [when n is one of the terms of A257803] a(n) = 2*a(A257807(n)-1).
As a composition of other permutations:
a(n) = A054429(A260431(n)).
a(n) = A260431(A260430(n)).
Showing 1-8 of 8 results.