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

A004601 Expansion of Pi in base 2 (or, binary expansion of Pi).

Original entry on oeis.org

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, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 2

Views

Author

Keywords

Examples

			11.0010010000111111011010101000100010000...
		

References

  • J. P. Delahaye, Le Fascinant Nombre Pi, "100000 digits of pi in base two", pp. 209-210; Pour la Science, Paris 1997.

Crossrefs

Pi in base b: this sequence (b=2), A004602 (b=3), A004603 (b=4), A004604 (b=5), A004605 (b=6), A004606 (b=7), A006941 (b=8), A004608 (b=9), A000796 (b=10), A068436 (b=11), A068437 (b=12), A068438 (b=13), A068439 (b=14), A068440 (b=15), A062964 (b=16), A060707 (b=60).

Programs

  • Maple
    convert(evalf(Pi), binary, 120);  # Alois P. Heinz, Dec 16 2018
  • Mathematica
    RealDigits[Pi, 2, 75][[1]]
    Table[ResourceFunction["NthDigit"][Pi, n, 2], {n, 1, 100}] (* Joan Ludevid, Jun 24 2022;easy to compute a(10000000)=0 with this function; requires Mathematica 12.0+ *)
  • PARI
    binary(Pi) \\ Altug Alkan, Apr 08 2018

A256108 Positions of nonzero digits in binary expansion of Pi.

Original entry on oeis.org

-1, 0, 3, 6, 11, 12, 13, 14, 15, 16, 18, 19, 21, 23, 25, 29, 33, 38, 40, 41, 43, 47, 48, 53, 57, 58, 60, 63, 64, 68, 71, 72, 76, 77, 80, 81, 85, 87, 91, 93, 94, 95, 103, 104, 106, 107, 108, 114, 115, 116, 119, 120, 122, 126, 129, 131, 134, 141, 144, 147, 148, 149, 155, 159
Offset: 1

Views

Author

David S. Metzler, Mar 14 2015

Keywords

Comments

Nonzero entries in A004601 (re-indexed to start at -1 and ascend).
The binary positions (exponents) are negated for convenience (as is standard practice). By the results of the PiHex project, the number 1,000,000,000,000,060 (for example) eventually appears in this sequence. Submitted on 3/14/15, (decimal) Pi Day.

Examples

			The most significant nonzero binary digit of pi occurs in the 2^1 position. Then there is a digit in the 2^0 position, then the 2^(-3) position, etc. Negate the exponents appearing to get this sequence.
		

Crossrefs

Cf. A004601 (Pi in base 2), A051480.

Programs

  • Mathematica
    PositionIndex[First[RealDigits[Pi, 2, 200]]][1] - 2 (* Paolo Xausa, Aug 04 2024 *)
  • PARI
    A256108_upto(N)={localbitprec(N+20); [i-2|i<-[1..-20+#N=concat(binary(Pi))], N[i]]} \\ M. F. Hasler, Jul 27 2024

Formula

Pi = Sum_{n>=0} 2^(-a(n)).
This sequence A256108 = { i | A004601(1-i) = 1 }. - M. F. Hasler, Jul 27 2024

A121657 Successive run lengths in decimal expansion of Pi.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Rick L. Shepherd, Aug 13 2006

Keywords

Examples

			a(25) = 2 as the 25th run, the first run of two or more identical digits in 3.14159265358979323846264338..., consists of the two 3s following the first 24 digits.
		

Crossrefs

Cf. A000796, A051480, A082586 (another version).

Programs

  • Mathematica
    Length /@ Split@RealDigits[Pi, 10, 111][[1]] (* Robert G. Wilson v, Aug 16 2006 *)

A373471 Primes indices of nonzero bits in Pi (A256108).

Original entry on oeis.org

3, 11, 13, 19, 23, 29, 41, 43, 47, 53, 71, 103, 107, 131, 149, 163, 173, 179, 197, 211, 227, 229, 239, 269, 281, 283, 293, 311, 349, 373, 379, 397, 409, 421, 457, 541, 557, 563, 577, 587, 599, 601, 607, 613, 617, 643, 647, 653, 659, 673, 709, 727, 733, 739, 743
Offset: 1

Views

Author

M. F. Hasler, Jul 27 2024

Keywords

Comments

Base 2 analog of A088565 (prime positions of '1's in decimal digits of Pi).

Examples

			Written in binary, Pi = 11.0010010000111111011010101000100010...[2] = Sum_{n >= -1} 2^-A256108(n), so the bits 1 have positions (-1, 0, 3, 6, 11, 12, 13, 14, 15, 16, 18, 19, 21, 23, 25, 29, 33, ...) and primes in this sequence are (3, 11, 13, 19, 23, ...) = this sequence.
		

Crossrefs

Cf. A256108 (indices of nonzero bits in Pi), A004601 (Pi in base 2), A051480 (run lengths in A004601).
Cf. A088563 (indices of '0's in decimals of Pi).
Cf. A088565 (prime indices of '1's in the decimal digits of Pi).

Programs

  • Mathematica
    Select[PositionIndex[First[RealDigits[Pi, 2, 1000]]][1] - 2, PrimeQ] (* Paolo Xausa, Jul 31 2024 *)
  • PARI
    select(isprime, A256108_upto(777))
Showing 1-4 of 4 results.