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

A255056 Trunk of number-of-runs beanstalk: The unique infinite sequence such that a(n-1) = a(n) - number of runs in binary representation of a(n).

Original entry on oeis.org

0, 2, 4, 6, 10, 12, 14, 18, 22, 26, 28, 30, 32, 36, 42, 46, 50, 54, 58, 60, 62, 64, 68, 74, 78, 84, 90, 94, 96, 100, 106, 110, 114, 118, 122, 124, 126, 128, 132, 138, 142, 148, 152, 156, 162, 168, 174, 180, 186, 190, 192, 196, 202, 206, 212, 218, 222, 224, 228, 234, 238, 242, 246, 250, 252, 254
Offset: 0

Views

Author

Antti Karttunen, Feb 14 2015

Keywords

Comments

All numbers of the form (2^n)-2 are present, which guarantees the uniqueness and also provides a well-defined method to compute the sequence, for example, via a partially reversed version A255066.
The sequence was inspired by a similar "binary weight beanstalk", A179016, sharing some general properties with it (like its partly self-copying behavior, see A255071), but also differing in some aspects. For example, here the branching degree is not the constant 2, but can vary from 1 to 4. (Cf. A255058.)

Crossrefs

First differences: A255336.
Terms halved: A255057.
Cf. A255053 & A255055 (the lower & upper bound for a(n)) and also A255123, A255124 (distances to those limits).
Cf. A255327, A255058 (branching degree for node n), A255330 (number of nodes in the finite subtrees branching from the node n), A255331, A255332
Subsequence: A000918 (except for -1).
Similar "beanstalk's trunk" sequences using some other subtracting map than A236840: A179016, A219648, A219666.

Programs

Formula

a(n) = A255066(A255122(n)).
Other identities and observations. For all n >= 0:
a(n) = 2*A255057(n).
A255072(a(n)) = n.
A255053(n) <= a(n) <= A255055(n).

A255054 Run lengths in A255072.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 14 2015

Keywords

Comments

Number of integers k which require exactly n steps to reach 0, when starting from k and iterating the map: x -> x - (number of runs in binary representation of x).

Examples

			0 is the only number reached from 0 in zero steps, thus a(0) = 1.
Both 1 and 2, in binary '1' and '10', when the number of runs (A005811) is subtracted from them, result zero: 1-1 = 2-2 = 0, and these are only such numbers where the zero is reached with one step, thus a(1) = 2.
For 3, 4 and 5, in binary '11', '100' and '101', subtracting the number of runs results 2 in all cases, thus two steps are requires to reach zero, and as there are no other such cases, a(2) = 3.
For 6, in binary '110', subtracting A005811 repeatedly gives -> 6-2 = 4, 4-2 = 2, 2-2 = 0, three steps in total, and as 6 is the only such number requiring three steps, a(3) = 1.
		

Crossrefs

Cf. A255059 (positions of odd terms), A255060 (positions of even terms), A255061 (apart from its second term 1, gives positions of ones here).
Analogous sequences: A086876, A219644, A219654.

Formula

a(n) = A255053(n+1) - A255053(n).
a(n) = 1 + A255055(n) - A255053(n).
Other identities. For all n >= 0:
a(n) = 1 + A255123(n) + A255124(n).

A255053 Least inverse of A255072; a(n) = smallest k such that A255072(k) = n.

Original entry on oeis.org

0, 1, 3, 6, 7, 11, 14, 15, 19, 23, 27, 30, 31, 35, 39, 44, 47, 51, 55, 59, 62, 63, 67, 71, 76, 79, 86, 91, 95, 99, 103, 108, 111, 115, 119, 123, 126, 127, 131, 135, 140, 143, 150, 155, 159, 166, 172, 176, 182, 187, 191, 195, 199, 204, 207, 214, 219, 223, 227, 231, 236, 239, 243, 247, 251, 254, 255
Offset: 0

Views

Author

Antti Karttunen, Feb 14 2015

Keywords

Comments

Also positions of records in A255072.

Crossrefs

Analogous sequences: A213708, A219643, A219653.

Formula

Other identities. For all n >= 0:
a(0) = 0; for n > 0: a(n) = a(n-1) + A255054(n-1).
a(n) = A255056(n) - A255123(n).

A255124 a(n) = A255055(n) - A255056(n).

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2, 2, 1, 0, 0, 0, 0, 1, 0, 2, 2, 1, 0, 1, 0, 0, 2, 2, 1, 0, 0, 0, 0, 1, 0, 2, 2, 1, 0, 1, 2, 2, 3, 3, 1, 1, 0, 0, 2, 2, 1, 0, 1, 0, 0, 2, 2, 1, 0, 0, 0, 0, 1, 0, 2, 2, 1, 0, 1, 2, 2, 3, 3, 1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 3, 1, 1, 0, 0, 2, 2, 1, 0, 1, 2, 2, 3, 3, 1, 1, 0, 0, 2, 2, 1, 0, 1, 0, 0, 2, 2, 1, 0, 0, 0, 0, 1, 0
Offset: 0

Views

Author

Antti Karttunen, Feb 14 2015

Keywords

Crossrefs

Analogous sequence: A218604.

Programs

Formula

a(n) = A255055(n) - A255056(n).
Showing 1-4 of 4 results.