Pierpont primes

Pierpont primes are of the form 2^u 3^v +1. I was surprised how fast this was.

With[{p = Select[Tuples[Range[0, 300], {2}], PrimeQ[2^#[[1]] 3^#[[2]] + 1] &]}, 
 Graphics[Tooltip[Point[#], #] & /@ p, PlotLabel -> "Pierpont primes" ]]

1 Like

With[{p = Select[Tuples[Range[0, 30], {3}], PrimeQ[2^#[1] 3^#[[2]] + 1] &]},
Graphics3D[Tooltip[Point[#], #] & /@ p,
PlotLabel → “Pierpont primes”]]

p = Select[Tuples[Range[0, 5], {3}], PrimeQ[2^#[1] 3^#[[2]] + 1] &]