A256108 Positions of nonzero digits in binary expansion of Pi.
-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
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.
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000
- Steve Pagliarulo, Stu's pi page: base 2
- Colin Percival, PiHex Home Page
- Wikipedia, PiHex
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)).
Comments