login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 6
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

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

LINKS

Hans Havermann, Table of n, a(n) for n = 1..10000

Hans Havermann, A walk in base-two pi

FORMULA

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

EXAMPLE

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

Sequence in context: A071993 A118777 A073068 * A208769 A255327 A255391

Adjacent sequences:  A166003 A166004 A166005 * A166007 A166008 A166009

KEYWORD

base,sign

AUTHOR

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

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified August 23 13:52 EDT 2017. Contains 291004 sequences.