login
Numbers k such that the second k binary digits of Pi represent a prime (leading zeros allowed).
0

%I #12 Apr 07 2020 09:13:43

%S 3,7,41,93,166,316,1449,6605,10015,13097,16284,19075,35137

%N Numbers k such that the second k binary digits of Pi represent a prime (leading zeros allowed).

%C Numbers k such that floor(2^(2*k-2)*Pi) mod 2^k is prime.

%C A random number of k binary digits has probability ~ constant/k of being prime, so heuristically we should expect the sequence to be infinite, but growing exponentially.

%e a(2)=7 is in the sequence because the first 14 binary digits in Pi are 11.001001000011; the second 7 binary digits are 1000011, or 67 in decimal, which is prime.

%p L:= floor(Pi*2^19998):

%p select(n -> isprime(floor(L*2^(2*n-20000)) mod 2^n), [$1..10000]);

%o (PARI) default(realprecision, 10^5);

%o is(k) = ispseudoprime(floor(4^(k-1)*Pi)%2^k); \\ _Jinyuan Wang_, Mar 31 2020

%Y Cf. A004601.

%K nonn,base,more

%O 1,1

%A _Robert Israel_, Mar 31 2020

%E a(9) from _Jinyuan Wang_, Mar 31 2020

%E a(10)-a(13) from _Chai Wah Wu_, Apr 06 2020