Pi-Prime

Author

Eric W. Weisstein
July 8, 2017

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PrimeNumbers/Pi-Prime.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Pi-Prime.html.

©2017 Wolfram Research, Inc. except for portions noted otherwise

Code

Overlap needed because of bad behavior of V5.2 RealDigits

PiPrime[n_]:=FromDigits[Drop[First[RealDigits[Pi,10,n+10]],-10]]

Enumeration

A060421

(p=Position[PiPrime/@Range[1000],_?PrimeQ]//Flatten)//Timing

PiPrime/@p

(p=Position[PiPrime/@Range[5000],_?PrimeQ]//Flatten)//Timing

Check

l={1,2,6,38,16208,47577,78073,613373};

IntegerLength[PiPrime[l[[-1]]]]

$Version

DateString[]

Do[
Print[{i,l[[i]],PrimeQ[PiPrime[l[[i]]]]//Timing}],
{i,Length[l]}
]

Floor Pi-Primes

Block[{$MaxExtraPrecision=10^6},l=Position[Floor[Pi^Range[10^3]],_?PrimeQ]//Flatten]//Timing

Block[{$MaxExtraPrecision=10^6},Floor[Pi^l]]

(l=Position[Floor[Pi^Range[10^4]],_?PrimeQ]//Flatten)//Timing

(l=Position[Floor[Pi^Range[10^5]],_?PrimeQ]//Flatten)//Timing

Ceiling e-Primes

Block[{$MaxExtraPrecision=10^6},l=Position[Ceiling[Pi^Range[10^3]],_?PrimeQ]//Flatten]//Timing

Block[{$MaxExtraPrecision=10^6},Ceiling[Pi^l]]

Block[{$MaxExtraPrecision=10^6},l=Position[Ceiling[Pi^Range[10^4]],_?PrimeQ]//Flatten]//Timing

Block[{$MaxExtraPrecision=10^6},l=Position[Ceiling[Pi^Range[10^5]],_?PrimeQ]//Flatten]//Timing