Is there a Lucas-Lehmer equivalent test for primes of the form ${3^p-1 \over 2}$? I'm reviewing the cyclotomic form $f_b(n)= {b^n-1 \over b-1}$ for various properties to extend an older treatize of mine on that form.    
With respect to primality there is the Lucas-Lehmer-test for primeness of $f_2(p)$ where of course $p$ itself must be a prime. 
I was now looking, whether I can say some things for primes of the form $f_3(p) = {3^p-1 \over 2}$ ,for instance $f_3(3)=13, f_3(7)=1093, f_3(13)=797161, ...$ (more terms see bottom). For this I was looking for a comparable test, similar to the scheme in the Lucas-Lehmer test. 
There is a short remark at Weisstein's mathworld involving the concept of Lucas-sequences for a generalized primality test (eq (2) to (4)), of which then the Lucas-Lehmer-test is only a special case, but I could not decode the formulae & recipes into some algorithm.  

So Q: Is there a primality test for numbers of the form $f_3(p) = {3^p-1 \over 2}$  similar to the scheme in the Lucas-Lehmer test?


More terms for $(3^{a(n)}-1)/2 \in \Bbb P$                

 a(n)=[3, 7, 13, 71, 103, 541, 1091, 1367, 1627, 4177,
 9011, 9551, 36913, 43063, 49681, 57917, 483611, 877843 ]

source: OEIS:A028491
 A: I refer you to Brillhart et al., Factorizations of $b^n\pm1$, published by the American Mathematical Society. The section, Introduction to the Main Tables, subsection Developments Contributing to the Present Tables, subsubsection Developments in Primality Testing, will tell you what methods there are for factoring such numbers. 
A: There is the basic idea behind the Lucas-Lehmer primality test. For $n= 2^p-1$ we can choose $d= 3$ (quadratic reciprocity) and $\alpha= 2+\sqrt{3}$

If $n$ is prime and $d$ is not a square $\bmod n$ then $$\mathbb{Z}/n\mathbb{Z}[\sqrt{d}] = \{ a+b \sqrt{d}, (a,b) \in \mathbb{Z}/n\mathbb{Z}\}$$ is a field with $n^2$ elements, and its multiplicative group is cyclic with $n^2-1$ elements. If we find an element $\alpha$ of multiplicative order $n+1$ (ie. $\alpha^{n+1} \equiv 1 \bmod n, \alpha^{(n+1)/p} \not\equiv 1 \bmod n $ for every prime divisors $p | n+1$) then $n$ is prime.
(since otherwise with $q$ the least prime divisor of $n$ then $\mathbb{Z}/q\mathbb{Z}[\sqrt{d}]^\times$ is a group with less than $q^2-1 \le n-1$ elements, so the order of $\alpha\bmod q$ can't be $n+1$)

Thus all we need is to know the prime divisors of $n+1$ and compute $\alpha^{(n+1)/p} \bmod n$ for many $\alpha$. The same idea works in $\mathbb{Z}/n\mathbb{Z}$ if we know the prime divisors of $n-1$, and in $\mathbb{Z}/n\mathbb{Z}[x]/(f(x))$ for some irreducible polynomial $f$ of degree $k$ if we know a large part of the factorization of $n^k-1$.
$$\boxed{\ \ \text{Thus it doesn't work for }\ \frac{3^a-1}{2} \quad(\text{but it does for }2\cdot 3^a-1)\ \ }$$
A: Having offered and awarded a bounty on this question for effort more than results, after considerable analysis and effort I have come up with a solution - probably.
Given a number of this form $\sum\limits_{k=0}^{P-1}{b^k}$
Where  b is an odd Prime
        , P is Prime
the following primality test can be used to either confirm primality or highly probable primality (I have seen plenty of evidence to suggest the high probability but none to disprove the confirmation). Assume all variables are BigInteger (or equivalent)
initialize with res = $2^b$,
test = $\frac{b^P-1}{b-1}$           
Repeat P-1 times
{
    res = (res ^ b) Mod(test);
}
if after repeating (res = 2^b)
then test is Prime

So for the case where b = 3, and to answer the question:
Initialize with 
res = 8 and test = $\frac{3^P-1}{2}$
Repeat P-1 times
{
    res = (res ^ 3) MOD(test);
}
if after repeating (res = 8)
then test is Prime

I will explain how I came up with this and why I am not at all confident that it proves primality as the Lucas-Lehmer test has been shown to.
My initial aim was to produce an efficient Fermat Primality test for 2, as I had noticed that nearly all (if not all?) numbers of this form with b=3, that passed that test were primes.
So I set out to find an efficient way to calculate $2^N mod(N)$ where N is the sum of powers of 3.
Noticing that $2^{3^{n+1}} = {({2^{3^n}}})^3$ where n>0, and being familiar with the repeated squaring method, I recognized this as a candidate for repeated cubing.
However, when I tested this out I was surprised to find that the final phase of this method (i.e. multiplying all remainders mod(N)) was not necessary as the $P^{th}$ element was always 8. The reason for this is unclear to me, but maybe someone can answer this. I was also surprised to find that I could not get the test to fail when tested with a number of different prime bases and for thousands of prime exponents with base 3.
So the questions I would have about this would be:


*

*Is this just a shortcut way of doing a Fermat Primality test for witness 2?

*If it is, is there something special about numbers of this form with odd prime bases that means they are never Fermat Liars for witness 2?

*Is it just that there are very few such liars around and I, and probably others, have not yet exposed one?

