login
Positions of 1's in binary expansion of Pi/4.
4

%I #28 Jan 21 2020 15:03:26

%S 1,2,5,8,13,14,15,16,17,18,20,21,23,25,27,31,35,40,42,43,45,49,50,55,

%T 59,60,62,65,66,70,73,74,78,79,82,83,87,89,93,95,96,97,105,106,108,

%U 109,110,116,117,118,121,122,124

%N Positions of 1's in binary expansion of Pi/4.

%H T. D. Noe, <a href="/A004711/b004711.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A256108(n) + 2. - _Lorenzo Sauras Altuzarra_, Jan 21 2020

%t Flatten[Position[RealDigits[Pi/4,2,150][[1]],1]] (* _Harvey P. Dale_, Jul 13 2015 *)

%o (PARI) default(realprecision, 100); select(x->(x==1), binary(Pi/4)[2], 1) \\ _Michel Marcus_, Oct 11 2018

%Y Cf. A003881, A004601, A256108.

%K nonn,base

%O 1,2

%A _Simon Plouffe_