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.

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

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).

A218543 Number of times when an odd number is encountered, when going from 2^(n+1)-1 to (2^n)-1 using the iterative process described in A071542.

Original entry on oeis.org

0, 1, 1, 2, 3, 6, 9, 18, 31, 54, 93, 167, 306, 574, 1088, 2081, 3998, 7696, 14792, 28335, 54049, 102742, 194948, 369955, 703335, 1340834, 2563781, 4915378, 9444799, 18180238, 35047841, 67660623, 130806130, 253252243, 491034479, 953404380, 1853513715, 3607440034
Offset: 0

Views

Author

Antti Karttunen, Nov 02 2012

Keywords

Comments

Ratio a(n)/A213709(n) develops as: 0, 1, 0.5, 0.666..., 0.6, 0.666..., 0.529..., 0.6, 0.574..., 0.551..., 0.520..., 0.506..., 0.498..., 0.499..., 0.503..., 0.511..., 0.521..., 0.531..., 0.539..., 0.545..., 0.547..., 0.546..., 0.542..., 0.536..., 0.531..., 0.525..., 0.520..., 0.516..., 0.512..., 0.508..., 0.504..., 0.501..., 0.498..., 0.497..., 0.495..., 0.495..., 0.495..., 0.495..., 0.495..., 0.496..., 0.496..., 0.497..., 0.497..., 0.498..., 0.498..., 0.498..., 0.497..., 0.497...
Ratio a(n)/A218542(n) develops as follows from n>=2 onward:
1, 2, 1.5, 2, 1.125, 1.5, 1.348..., 1.227..., 1.081..., 1.025..., 0.994..., 0.997..., 1.013..., 1.045..., 1.086..., 1.132..., 1.172..., 1.198..., 1.208..., 1.201..., 1.182..., 1.157..., 1.131..., 1.107..., 1.085..., 1.065..., 1.047..., 1.031..., 1.016..., 1.004..., 0.994..., 0.986..., 0.981..., 0.979..., 0.978..., 0.979..., 0.981..., 0.983..., 0.986..., 0.988..., 0.989..., 0.990..., 0.991..., 0.991..., 0.989..., 0.987...
Observation: A179016 seems to alternatively slightly favor the odd numbers and then again the even numbers, at least for the terms computed so far.
Please plot this sequence against A218542 in the "ratio mode" (given as a link) to see how smoothly (almost "continuously") the ratios given above develop.
What is the reason for that smoothness? (Conjecture: The distribution of "tendrils", i.e. finite subtrees in the beanstalk and its almost fractal nature? Cf: A218787.)

Examples

			(2^0)-1 (0) is reached from (2^1)-1 (1) with one step by subtracting A000120(1) from 1. Zero is not an odd number, so a(0)=0.
(2^1)-1 (1) is reached from (2^2)-1 (3) with one step by subtracting A000120(3) from 3. One is an odd number, so a(1)=1.
(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. Four is not an odd number, but three is, so a(2)=1.
		

Crossrefs

a(n) = A213709(n)-A218542(n). Cf. A213733, A218787, A218789.
Analogous sequence for factorial number system: A219663.

Formula

a(n) = Sum_{i=A218600(n) .. (A218600(n+1)-1)} A213729(i)

A230409 Partial sums of A230407.

Original entry on oeis.org

0, -1, 0, 3, -2, -3, 0, 1, 4, -1, -2, 5, 4, -1, -2, -7, -2, 3, -2, -13, -12, -9, -20, -19, -22, -19, -18, -15, -20, -21, -14, -15, -20, -21, -26, -21, -16, -21, -32, -31, -28, -49, -48, -51, -54, -45, -44, -45, -50, -51, -56, -51, -46, -51, -62, -61, -58, -79
Offset: 0

Views

Author

Antti Karttunen, Nov 10 2013

Keywords

Comments

The term a(n) indicates approximately the "balance" of the factorial beanstalk (cf. A219666) at n steps up from the root, which in turn correlates with the behavior of such sequences as A219662 and A219663.
This sequence relates to the factorial base representation (A007623) in the same way as A218789 relates to the binary system.
Question: When will a negative term occur next time, after a(251) = -41 ?

Crossrefs

Formula

a(0) = 0, a(n) = a(n-1) + A230407(n).

A255332 Partial sums of A255331.

Original entry on oeis.org

-1, -1, -1, -5, -4, -4, -11, -11, -14, -13, -13, -10, -10, -16, -16, -22, -22, -25, -24, -24, -21, -21, -33, -33, -33, -38, -38, -34, -34, -40, -40, -46, -46, -49, -48, -48, -45, -45, -57, -57, -57, -50, -49, -61, -59, -59, -59, -64, -64, -60, -60, -72, -72, -72, -77, -77, -73, -73, -79, -79, -85, -85, -88, -87, -87, -84
Offset: 0

Views

Author

Antti Karttunen, Feb 21 2015

Keywords

Comments

a(805) = 54 is the first positive term.
Is a(836) = -32 the last negative term?
The conspicuous "noncontinuity" which occurs in the scatter plot for the first time at n=5790 is caused by a sudden negative record at A255331(5790) = -708. Note that A255328(5790) = 708.

Crossrefs

Analogous sequences: A218789, A230409.

Formula

a(0) = -1; for n >= 1: a(n) = a(n-1) + A255331(n).

A218618 Absolute value of a(n) tells the size of the n-th side-tree ("tendril", A213730(n)) in the binary beanstalk; the sign tells on which side of the infinite trunk (A179016) it is.

Original entry on oeis.org

0, 1, -1, 1, -1, 3, 1, -1, 3, 5, -1, 1, -1, 3, 5, -1, -7, 1, 1, 3, 1, -1, 3, 5, -1, -7, 1, 1, 3, -7, 1, 1, -5, 1, -5, -3, -1, 1, -1, 3, 5, -1, -7, 1, 1, 3, -7, 1, 1, -5, 1, -5, -3, -1, -7, 1, 1, -5, 1, 11, 1, 1, 13, 1, -5, -1, 3, 1, -1, 3, 5, -1, -7, 1, 1, 3
Offset: 0

Views

Author

Antti Karttunen, Dec 03 2012

Keywords

Comments

Positive and negative terms correspond to the tendrils that sprout respectively at the left and right sides of the infinite trunk, when the beanstalk is drawn with the lesser numbers branching to the left. The absolute values give the sizes of those tendrils, with all nodes included: The leaves, the internal vertices as well as the root itself: A213730(n).

Crossrefs

Partial sums: A218785, A218789. Cf. also A218786, A218613.

Programs

Formula

a(n) = -1^A213730(n) * A213727(A213730(n)).

A218785 Partial sums of absolute values of A218618.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 8, 9, 12, 17, 18, 19, 20, 23, 28, 29, 36, 37, 38, 41, 42, 43, 46, 51, 52, 59, 60, 61, 64, 71, 72, 73, 78, 79, 84, 87, 88, 89, 90, 93, 98, 99, 106, 107, 108, 111, 118, 119, 120, 125, 126, 131, 134, 135, 142, 143, 144, 149, 150, 161, 162, 163
Offset: 0

Views

Author

Antti Karttunen, Dec 03 2012

Keywords

Comments

The term a(n) tells how many nodes there are in total in all side-trees ("tendrils") encountered (see A213730) after we have walked n steps up along the infinite stem of the binary beanstalk, A179016.

Crossrefs

Cf. A218789.

A257805 Partial sums of A257259: a(0) = 1; for n >= 1, a(n) = A257259(n) + a(n-1).

Original entry on oeis.org

1, 0, 0, -1, -2, -5, -6, -12, -20, -30, -37, -41, -39, -37, -51, -141, -459, -1355, -3521, -8212, -17510, -34685, -64692, -114953, -196617, -326254, -527227, -828432, -1254932, -1800115, -2361626, -2613748, -1777205, 1765725, 11078200, 31587185, 72445272, 148564309, 283768148, 516004565, 906713910, 1559424960, 2660917133, 4581930804, 8140743021, 15311144248, 31111188060, 68512065476
Offset: 0

Views

Author

Antti Karttunen, May 13 2015

Keywords

Crossrefs

Formula

a(0) = 1; for n >= 1, a(n) = A257259(n) + A257805(n-1).
Other identities. For all n >= 0:
a(n) = -A257806(A218600(n+1)).
Showing 1-8 of 8 results.