Prime Number Test -> Is result of function "[(2^n) - 2]/n" integer ?

From: Bence (A_at_B.NET)
Date: 06/11/04


Date: Fri, 11 Jun 2004 14:34:50 +0300

f(n) = [(2^n) - 2] / n

If f(n) result is an integer value, then n is prime.

What is the fastest way to calculate if n is prime with this way ?

Thanks