The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A332929 Position where the binary expansion of n occurs for the first time in the binary expansion of Pi. 0
 3, 1, 2, 1, 2, 18, 1, 13, 8, 2, 21, 18, 1, 17, 16, 13, 8, 27, 2, 62, 25, 21, 18, 93, 49, 1, 20, 17, 95, 16, 15, 13, 97, 8, 27, 45, 2, 128, 62, 146, 25, 60, 21, 395, 229, 18, 93, 209, 49, 65, 1, 78, 42, 20, 17, 105, 95, 116, 186, 16, 175, 15, 14, 13, 97, 110 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 LINKS EXAMPLE In binary, Pi = 11.00100100.... The bitstring 10 (for 2) occurs at position 2, so a(2) = 2. MATHEMATICA p = RealDigits[Pi, 2, 500][[1]]; L = {}; Do[t = SequencePosition[p, IntegerDigits[n, 2], 1]; If[t == {}, Break[], AppendTo[L, t[[1, 1]]]], {n, 0, 65}]; L (* Giovanni Resta, Mar 16 2020 *) PROG (Perl) #! /usr/bin/perl # Feed b004601.txt to this to get the binary digits of Pi. while (<>) {     chomp;     (undef, \$d[\$n++]) = split(" "); } \$pi = join("", @d); \$k = 0; while (1) {     last if (\$pos = index(\$pi, sprintf("%b", \$k++))) < 0;     \$out .= \$pos +2 . ", "; } print \$out, "\n"; CROSSREFS Cf. A004601, A014777, A178707. Cf. A032445 (for decimal expansion rather than binary). Sequence in context: A188902 A324081 A256262 * A157520 A325116 A227339 Adjacent sequences:  A332926 A332927 A332928 * A332930 A332931 A332932 KEYWORD nonn,base,easy AUTHOR Thomas König, Mar 02 2020 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 1 10:37 EDT 2021. Contains 346385 sequences. (Running on oeis4.)