Power Difference Prime

Author

Eric W. Weisstein
November 29, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PrimeNumbers/PowerDifferencePrime.nb.

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

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

Check

l={2,3,4,7,11,17,106,120,1907,7918};

Digits[(p=l[[-1]])^p-(p-1)^(p-1)]

Do[Print[{i,l[[i]],PrimeQ[(p=l[[i]])^p-(p-1)^(p-1)]//Timing}],
{i,Length[l]}]