login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A199693 Related to the expansion of Pi in base 2 (A004601). 0
12, 4, 16, 126, 6, 2, 2, 8, 8, 16, 2, 6, 8, 48, 8, 6, 4, 24, 4, 24, 12, 24, 2, 8, 2, 896, 6, 224, 28, 6, 8, 4, 2, 4, 64, 4, 4, 224, 8, 8, 2, 4, 12, 124, 24, 14, 256, 32, 2, 14, 62, 2, 4, 24, 14, 24, 4, 28, 6, 12, 8, 4, 2, 8, 2, 4, 2, 32, 16, 60, 24, 56, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
A004601 is the concatenation of binary digits of the terms written in base 2.
LINKS
EXAMPLE
A004601( expansion of Pi in base 2) :
1,1,0,0,1,0,0,1,0,0,0,0,1,1,1,1,1,1,0,1,1,0,1,0,1,0.... ->
1,1,0,0 | 1,0,0 | 1,0,0,0,0 | 1,1,1,1,1,1,0 | 1,1,0 | 1,0 | ... ->
1100 | 100 |10000 | 1111110 |110 |10 | 10 | ... (in base 2) ->
12 , 4, 16, 126, 6, 2, 2, ... (in base 10) .
MATHEMATICA
f[{a_, b_}] := (2^a - 1)*2^b; f /@ Partition[Length /@ Split[First[RealDigits[π, 2, 10^3]]], 2] (* T. D. Noe, Nov 09 2011 *)
PROG
(Python)
import gmpy2
pi = gmpy2.const_pi(precision=310) # increase precision for more terms
h = "{0:A}".format(pi)[2:-5].replace(".", "")
b = bin(int(h, 16))[2:]
splitb = b.replace("01", "0, 1").split(", ")
print([int(t, 2) for t in splitb[:-1]]) # Michael S. Branicky, Dec 04 2021
CROSSREFS
Sequence in context: A307164 A181829 A339467 * A166206 A040137 A092237
KEYWORD
easy,nonn,base
AUTHOR
Philippe Deléham, Nov 09 2011
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)