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.

Previous Showing 11-19 of 19 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).

A218542 Number of times when an even 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

1, 0, 1, 1, 2, 3, 8, 12, 23, 44, 86, 163, 308, 576, 1074, 1991, 3680, 6800, 12626, 23644, 44751, 85567, 164941, 319694, 621671, 1211197, 2362808, 4614173, 9018299, 17635055, 34486330, 67408501, 131642673, 256795173, 500346954, 973913365, 1894371802, 3683559071
Offset: 0

Views

Author

Antti Karttunen, Nov 02 2012

Keywords

Comments

Ratio a(n)/A213709(n) develops as: 1, 0, 0.5, 0.333..., 0.4, 0.333..., 0.471..., 0.400..., 0.426..., 0.449..., 0.480..., 0.494..., 0.502..., 0.501..., 0.497..., 0.489..., 0.479..., 0.469..., 0.461..., 0.455..., 0.453..., 0.454..., 0.458..., 0.464..., 0.469..., 0.475..., 0.480..., 0.484..., 0.488..., 0.492..., 0.496..., 0.499..., 0.502..., 0.503..., 0.505..., 0.505..., 0.505..., 0.505..., 0.505..., 0.504..., 0.504..., 0.503..., 0.503..., 0.502..., 0.502..., 0.502..., 0.503..., 0.503... (See further comments at A218543).

Examples

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

Crossrefs

Cf. A219662 (analogous sequence for factorial number system).

Formula

a(n) = Sum_{i=A218600(n) .. (A218600(n+1)-1)} A213728(i).
a(n) = A213709(n) - A218543(n).

Extensions

More terms from Antti Karttunen, Jun 05 2013

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)

A261233 a(n) = number of steps to reach 0 when starting from k = (3^n)-1 and repeatedly applying the map that replaces k with k - (sum of digits in base-3 representation of k).

Original entry on oeis.org

0, 1, 3, 8, 20, 49, 123, 319, 849, 2294, 6250, 17112, 47013, 129605, 358838, 998805, 2796093, 7869800, 22251147, 63141639, 179701239, 512744599, 1466635089, 4205423895, 12087339723, 34816804310, 100469592521, 290336059740, 839932833290, 2432050970420, 7047731703137, 20440131344750, 59334695322383, 172409162871823, 501489513690423, 1460214792034791
Offset: 0

Views

Author

Antti Karttunen, Aug 13 2015

Keywords

Crossrefs

One less than A261232.
Cf. A261234 (the first differences).
Cf. also A218600.

Formula

a(0) = 0; for n >= 1, a(n) = A261234(n-1) + a(n-1).
a(n) = A261231((3^n)-1).
a(n) = A261232(n)-1.

Extensions

Terms from a(24) onward added from the output of Hiroaki Yamanouchi's program by Antti Karttunen, Aug 16 2015

A233268 The middle point of row n in binary beanstalk related sequences A179016, A218602, A218616, A233270, A233271.

Original entry on oeis.org

1, 2, 3, 6, 10, 17, 30, 53, 95, 171, 310, 564, 1036, 1918, 3574, 6691, 12566, 23653, 44610, 84309, 159698, 303253, 577352, 1102121, 2109448, 4047967, 7787277, 15015347, 29011671, 56150867, 108825599, 211127246, 409886210, 796134319, 1546848744, 3006198333, 5843799964
Offset: 1

Views

Author

Antti Karttunen, Dec 29 2013

Keywords

Comments

a(n) points to the center of each palindromic row/subrange of A233270, and to the lower position nearest to the center, if the length of range is even.
For all n, A218602(a(n)) = a(n) + (1-A000035(A213709(n-1))).

Crossrefs

Formula

a(n) = floor((A213710(n-1) + A218600(n)) / 2).
a(n) = A218600(n-1) + ceiling((A213709(n-1)/2)).

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.

A233274 Relative offsets from the middle point of each row of A233271 & A218616 to the first point where the former exceeds the latter, which apart of case a(3)=-1 is always left of or at the middle point.

Original entry on oeis.org

0, 0, -1, 0, 0, 0, 0, 1, 2, 4, 8, 13, 22, 38, 68, 125, 232, 429, 786, 1428, 2578, 4645, 8364, 15064, 27145, 48990, 88736, 161813, 298001, 555451, 1048207, 1999608, 3844722, 7425094, 14356699, 27722560, 53374986
Offset: 1

Views

Author

Antti Karttunen, Jan 01 2014

Keywords

Comments

The sequence tells how many positions to the left of center of each row/subrange (of irregular tables like A233270, central point given by A233268) the sequences A233271 and A218616 cross each other (please see the linked graph).

Crossrefs

Programs

Formula

a(1)=a(2)=0, and for n > 2, a(n) = ⌈(A213709(n-1)/2)⌉ - A226060(n-2) - 1. Where ⌈x⌉ stands for ceiling(x)

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

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.
Previous Showing 11-19 of 19 results.