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.

A140515 Numbers n such that one of floor(10^n * Pi) or ceiling(10^n * Pi) is prime.

This page as a plain text file.
%I A140515 #17 Feb 16 2025 08:33:08
%S A140515 0,1,5,11,18,37,601,1901,2394,3970,5826,16207
%N A140515 Numbers n such that one of floor(10^n * Pi) or ceiling(10^n * Pi) is prime.
%H A140515 Carlos B. Rivera F. <a href="http://www.primepuzzles.net/puzzles/puzz_050.htm">Puzzle 50. Approximation to pi with primes</a>, The Prime Puzzles and Problems Connection.
%H A140515 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PiDigits.html">Pi Digits</a>
%e A140515 ceiling(10^11*Pi) = ceiling(314159265358.9...) = 314159265359 is prime, so 11 is in the sequence.
%t A140515 npQ[n_]:=Module[{c=10^n Pi},Total[Boole[PrimeQ[{Floor[ c],Ceiling[ c]}]]] == 1]; Select[Range[0,4000],npQ] (* The program generates the first 10 terms of the sequence. To generate more, increase the Range constant, but the program may take a long time to run. *) (* _Harvey P. Dale_, May 07 2021 *)
%o A140515 (PARI) isA140515(n)=isprime(bitor(floor(10^n*Pi),1))
%K A140515 nonn,base,more
%O A140515 1,3
%A A140515 _Marvin Ray Burns_, Jul 01 2008, Jul 02 2008