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.

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

Original entry on oeis.org

3, 7, 41, 93, 166, 316, 1449, 6605, 10015, 13097, 16284, 19075, 35137, 70558, 128436
Offset: 1

Views

Author

Robert Israel, Mar 31 2020

Keywords

Comments

Numbers k such that floor(2^(2*k-2)*Pi) mod 2^k is prime.
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.
a(16) > 2*10^5. - Michael S. Branicky, Dec 17 2024

Examples

			a(2) = 7 is a term 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.
		

Crossrefs

Programs

  • Maple
    L:= floor(Pi*2^19998):
    select(n -> isprime(floor(L*2^(2*n-20000)) mod 2^n), [$1..10000]);
  • PARI
    default(realprecision, 10^5);
    is(k) = ispseudoprime(floor(4^(k-1)*Pi)%2^k); \\ Jinyuan Wang, Mar 31 2020

Extensions

a(9) from Jinyuan Wang, Mar 31 2020
a(10)-a(13) from Chai Wah Wu, Apr 06 2020
a(14)-a(15) from Michael S. Branicky, Dec 16 2024