OFFSET
1,1
COMMENTS
Terms of A123239 which are also primes in Z(w) where w = (-1+sqrt(-3))/2 is a cube root of unity.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MATHEMATICA
MangammalQ[p_] := Block[{k = 3}, While[k > 2, k = Mod[3 k, p]]; k != 2];
A168367 = Select[Prime[Range[290]], MangammalQ[#] && Mod[#, 3] == 2 &] (* Ray Chandler, Jul 21 2011 *)
PROG
(PARI) is(n)=if(n<9, return(n==2)); if(n%6!=5 || !isprime(n) || znorder(Mod(3, n)) == n-1, return(0)); my(m=Mod(3, n)); while(m!=1, m*=3; if(m==2, return(0))); 1 \\ Charles R Greathouse IV, May 21 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
A.K. Devaraj, Nov 23 2009, Nov 25 2009
EXTENSIONS
Extended by Ray Chandler, Jul 21 2011
Definition simplified by Charles R Greathouse IV, May 21 2017
STATUS
approved