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

A166006 Distance from the origin using the binary expansion of Pi to walk the number line: Start at the origin; subtract one for each '0' digit, and add one for each '1' digit.

Original entry on oeis.org

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

Views

Author

Steven Lubars (lubars(AT)gmail.com), Oct 03 2009

Keywords

Comments

Of the first 10^10 terms, 5738590822 are positive and 4261262135 are negative. - Hans Havermann, Nov 27 2016

Examples

			The first five digits of the expansion are 1, 1, 0, 0, 1.
Starting at 0, we get 0 + 1 + 1 - 1 - 1 + 1 = 1, so a(5) = 1.
		

Crossrefs

Cf. A004601, A039624 (indices of zero), A278737 (record maxima), A278738 (record minima), A369900.

Formula

a(n) = Sum_{k=1..n} (2*b(k) - 1), where b(n) is the n-th binary digit of Pi.

A278738 a(n) is the index of the first occurrence of -n in A166006.

Original entry on oeis.org

7, 10, 11, 12, 39, 48, 53, 54, 57, 58, 69, 72, 77, 86, 91, 92, 101, 102, 103, 104, 115, 130, 135, 138, 139, 140, 141, 142, 145, 148, 155, 156, 159, 160, 163, 164, 169, 196, 197, 198, 201, 202, 203, 204, 273, 274, 275, 276, 279, 280, 281, 306, 307, 308, 309, 312, 1955
Offset: 1

Views

Author

Hans Havermann, Nov 27 2016

Keywords

Comments

These are necessarily the indices of record minima in A166006.

Examples

			-3 first occurs in A166006 at position 11, so a(3) = 11.
		

Crossrefs

Showing 1-2 of 2 results.