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.

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.

This page as a plain text file.
%I A166006 #19 Feb 05 2024 18:39:22
%S A166006 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,
%T A166006 1,0,-1,-2,-1,-2,-3,-4,-5,-4,-5,-4,-3,-4,-3,-4,-5,-6,-5,-4,-5,-6,-7,
%U A166006 -8,-7,-8,-9,-10,-9,-8,-9,-8,-9,-10,-9,-8,-9,-10,-11,-10,-11,-12,-11,-10,-11
%N 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.
%C A166006 Of the first 10^10 terms, 5738590822 are positive and 4261262135 are negative. - _Hans Havermann_, Nov 27 2016
%H A166006 Hans Havermann, <a href="/A166006/b166006.txt">Table of n, a(n) for n = 1..10000</a>
%H A166006 Hans Havermann, <a href="http://gladhoboexpress.blogspot.ca/2016/11/a-walk-in-base-two-pi.html">A walk in base-two pi</a>
%F A166006 a(n) = Sum_{k=1..n} (2*b(k) - 1), where b(n) is the n-th binary digit of Pi.
%e A166006 The first five digits of the expansion are 1, 1, 0, 0, 1.
%e A166006 Starting at 0, we get 0 + 1 + 1 - 1 - 1 + 1 = 1, so a(5) = 1.
%Y A166006 Cf. A004601, A039624 (indices of zero), A278737 (record maxima), A278738 (record minima), A369900.
%K A166006 base,look,sign
%O A166006 1,2
%A A166006 Steven Lubars (lubars(AT)gmail.com), Oct 03 2009