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

A179016 The infinite trunk of binary beanstalk: The only infinite sequence such that a(n-1) = a(n) - number of 1's in binary representation of a(n).

Original entry on oeis.org

0, 1, 3, 4, 7, 8, 11, 15, 16, 19, 23, 26, 31, 32, 35, 39, 42, 46, 49, 53, 57, 63, 64, 67, 71, 74, 78, 81, 85, 89, 94, 97, 101, 104, 109, 112, 116, 120, 127, 128, 131, 135, 138, 142, 145, 149, 153, 158, 161, 165, 168, 173, 176, 180, 184, 190, 193, 197, 200, 205, 209
Offset: 0

Views

Author

Carl R. White, Jun 24 2010

Keywords

Comments

a(n) tells in what number we end in n steps, when we start climbing up the infinite trunk of the "binary beanstalk" from its root (zero). The name "beanstalk" is due to Antti Karttunen.
There are many finite sequences such as 0,1,2; 0,1,3,4,7,9; etc. obeying the same condition (see A218254) and as the length increases, so (necessarily) does the similarity to this infinite sequence.

Crossrefs

A subsequence of A005187, i.e., a(n) = A005187(A213715(n)). For all n,
A071542(a(n)) = n, and furthermore A213708(n) <= a(n) <= A173601(n). (Cf. A218603, A218604).
Rows of A218254, when reversed, converge towards this sequence.
Cf. A276623, A219648, A219666, A255056, A276573, A276583, A276613 for analogous constructions, and also A259934.

Programs

  • Mathematica
    TakeWhile[Reverse@ NestWhileList[# - DigitCount[#, 2, 1] &, 10^3, # > 0 &], # <= 209 &] (* Michael De Vlieger, Sep 12 2016 *)

Formula

a(0)=0, a(1)=1, and for n > 1, if n = A218600(A213711(n)) then a(n) = (2^A213711(n)) - 1, and in other cases, a(n) = a(n+1) - A213712(n+1). (This formula is based on Carl White's observation that this iterated/converging path must pass through each (2^n)-1. However, it would be very interesting to know whether the sequence admits more traditional recurrence(s), referring to previous, not to further terms in the sequence in their definition!) - Antti Karttunen, Oct 26 2012
a(n) = A218616(A218602(n)). - Antti Karttunen, Mar 04 2013
a(n) = A054429(A233271(A218602(n))). - Antti Karttunen, Dec 12 2013

Extensions

Starting offset changed from 1 to 0 by Antti Karttunen, Nov 05 2012

A213709 Number of steps to go from 2^(n+1)-1 to (2^n)-1 using the iterative process described in A071542.

Original entry on oeis.org

1, 1, 2, 3, 5, 9, 17, 30, 54, 98, 179, 330, 614, 1150, 2162, 4072, 7678, 14496, 27418, 51979, 98800, 188309, 359889, 689649, 1325006, 2552031, 4926589, 9529551, 18463098, 35815293, 69534171, 135069124, 262448803, 510047416, 991381433, 1927317745, 3747885517
Offset: 0

Views

Author

Antti Karttunen, Oct 26 2012

Keywords

Comments

Also, apart from the first term a(0)=1, the number of terms in A179016 whose binary width is n+2 bits and whose second most significant bit is zero. For example, there is one term 4 (100) in three-bit range; two terms 8 (1000) and 11 (1011) in four bit range; three such terms: 16 (10000), 19 (10011) and 23 (10111) in five-bit range; five terms: 32, 35, 39, 42, 46 in six-bit range. This stems from the half-recursive nature of A179016, especially, that for all n >= 4, a(n) also gives the number of steps to go from (2^(n+1) + 2^n + 1) to 2^n using the iterative process described in A071542. Cf. also A226060. - Antti Karttunen, Jun 12 2013
Ratio a(n+1)/a(n) develops as: 1, 2, 1.5, 1.667..., 1.8, 1.889..., 1.765..., 1.8, 1.815..., 1.827..., 1.844..., 1.861..., 1.873..., 1.880..., 1.883..., 1.886..., 1.888..., 1.891..., 1.896..., 1.901..., 1.906..., 1.911..., 1.916..., 1.921..., 1.926..., 1.930..., 1.934..., 1.937..., 1.940..., 1.941..., 1.942..., 1.943..., 1.943..., 1.944..., 1.944..., 1.945..., 1.945..., 1.946..., 1.947..., 1.949..., 1.950..., 1.951..., 1.953..., 1.954..., 1.955..., 1.957..., 1.958... (which seem to converge slowly towards 2; see also comments at A218543).

Examples

			(2^0)-1 (0) is reached from (2^1)-1 (1) with one step by subtracting A000120(1) from 1.
(2^1)-1 (1) is reached from (2^2)-1 (3) with one step by subtracting A000120(3) from 3.
(2^2)-1 (3) is reached from (2^3)-1 (7) with two steps by first subtracting A000120(7) from 7 -> 4, and then subtracting A000120(4) from 4 -> 3.
Thus a(0)=a(1)=1 and a(2)=2.
		

Crossrefs

First differences of A218600 and A213710. First differences of this sequence: A226060.
Analogous sequence for factorial number system: A219661.

Formula

a(n) = A071542((2^(n+1))-1) - A071542((2^n)-1).
a(n) = A218542(n) + A218543(n) = A011782(n) - A213722(n).

Extensions

More terms from Antti Karttunen, Jun 05 2013

A218600 Partial sums of A213709.

Original entry on oeis.org

0, 1, 2, 4, 7, 12, 21, 38, 68, 122, 220, 399, 729, 1343, 2493, 4655, 8727, 16405, 30901, 58319, 110298, 209098, 397407, 757296, 1446945, 2771951, 5323982, 10250571, 19780122, 38243220, 74058513, 143592684, 278661808, 541110611, 1051158027, 2042539460, 3969857205
Offset: 0

Views

Author

Antti Karttunen, Nov 05 2012

Keywords

Comments

a(n) tells the position of (2^n)-1 in A179016.

Crossrefs

a(n) = A213710(n)-1. A179016(a(n))=(2^n)-1. Cf. A213711.

Extensions

a(29)-a(36) from Alois P. Heinz, Jul 03 2022

A218602 Simple self-inverse permutation of natural numbers: after zero, list each block of A213709(n) numbers in reverse order, from A218600(n) to A213710(n-1).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 10 2012

Keywords

Comments

This permutation can be used to map between the sequences A179016 and A218616. E.g. A179016(n) = A218616(a(n)) and vice versa: A218616(n) = A179016(a(n)).

Crossrefs

Programs

Formula

a(n) = A218600(A213711(n))-A218601(n).

A218616 The infinite trunk of beanstalk (A179016) with reversed subsections.

Original entry on oeis.org

0, 1, 3, 7, 4, 15, 11, 8, 31, 26, 23, 19, 16, 63, 57, 53, 49, 46, 42, 39, 35, 32, 127, 120, 116, 112, 109, 104, 101, 97, 94, 89, 85, 81, 78, 74, 71, 67, 64, 255, 247, 240, 236, 231, 225, 221, 215, 209, 205, 200, 197, 193, 190, 184, 180, 176, 173, 168, 165, 161
Offset: 0

Views

Author

Antti Karttunen, Nov 10 2012

Keywords

Comments

This can be viewed as an irregular table: after the initial zero on row 0, start each row n with (2^n)-1 and subtract repeatedly the number of 1-bits to get successive terms, until the number that has already been listed (which is always (2^(n-1))-1) is encountered, which is not listed second time, but instead, the current row is finished and the next row starts with (2^(n+1))-1, with the same process repeated.
This contains the terms in the infinite trunk of beanstalk (A179016) listed in partially reversed manner: after the initial zero each subsequence lists A213709(n) successive terms from A179016, descending from (2^n)-1 downwards, usually down to 2^(n-1) (conjectured to indeed be a power of 2 in each case, apart from 2 itself missing from the beginning of the sequence).
Currently A179016 and many of the derived sequences are much easier and somewhat faster to compute with the help of this sequence, especially if the program computes any other required values incrementally in the same loop.

Examples

			After zero, we start with (2^1)-1 = 1, subtract A000120(1)=1 from it, resulting 1-1=0 (which is of the form (2^0)-1, thus not listed second time), instead, start the next row with (2^2)-1 = 3, subtract A000120(3)=2 from it, resulting 3-2=1, which has been already encountered, thus start the next row with (2^3)-1 = 7, subtract A000120(7)=3 from it, resulting 7-3=4, which is listed after 7, then 4-A000120(4)=4-1=3, which is of the form (2^k)-1 and already encountered, thus start the next row with (2^4)-1 = 15, etc. This results an irregular table which begins as:
0; 1; 3; 7, 4; 15, 11, 8; 31, 26, 23, 19, 16; 63, 57, ...
After zero, each row n is A213709(n-1) elements long.
		

Crossrefs

a(n) = A179016(A218602(n)). The rows are the initial portions of every (2^n)-1:th row in A218254.

Formula

a(0)=0, a(1)=1, and for n > 1, if n = A213710(A213711(n)-1) then a(n) = (2^A213711(n)) - 1, and in other cases, a(n) = A011371(a(n-1)).
Alternatively: For n < 4, a(n) = (2^n)-1, and for n >= 4, a(n) = A004755(A004755(A011371(a(n-1)))) if A011371(a(n-1))+1 is power of 2, otherwise just A011371(a(n-1)).

A218601 After the first zero, integers from 0 to A213709(n)-1 followed by integers from 0 to A213709(n+1)-1, etc.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 0
Offset: 0

Views

Author

Antti Karttunen, Nov 10 2012

Keywords

Crossrefs

Needed for A218602. Cf. also A218599, A053645, A082853, A002262.

Programs

Formula

a(0)=0, and for n>0, a(n) = (n-A218600(A213711(n)-1))-1.

A230411 a(n) = minimal k for which A219665(k) >= n; a(n) = one more than the factorial base width (A084558) of the (n-1)th term in the infinite trunk of factorial beanstalk (A219666).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 22 2013

Keywords

Comments

a(1)=1, after which each term n occurs A219661(n-1) times.
Auxiliary function for computing A219666, A230431 and A230432.

Crossrefs

Analogous sequence for binary system: A213711.

Formula

a(n) = 1 + A084558(A219666(n-1)) = 1 + A084558(A230416(n-1)). [Each a(n) is one more than the number of digits needed in factorial base to write the (n-1)-th term in the infinite trunk of factorial beanstalk]

A255121 After zero, each n occurs A255071(n) times.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 14 2015

Keywords

Comments

An auxiliary sequence for computing A255122 and A255056.

Crossrefs

Similar sequence: A213711.

A218599 After the first zero, integers from A213709(n)-1 to 0 followed by integers from A213709(n+1)-1 to 0, etc.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 1, 0, 4, 3, 2, 1, 0, 8, 7, 6, 5, 4, 3, 2, 1, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
Offset: 0

Views

Author

Antti Karttunen, Nov 10 2012

Keywords

Crossrefs

Cf. A218601.

Programs

Formula

a(n) = A218600(A213711(n))-n.
Showing 1-9 of 9 results.