%I #20 Dec 25 2018 11:36:04
%S 2,3,11,13,37,41,59,61,67,73,83,103,107,109,131,151,157,179,181,193,
%T 227,229,251,271,277,307,313,347,349,367,373,397,419,421,433,443,467,
%U 491,523,541,547,563,577,587,613,619,659,661,673,683,709,733,757,761
%N Primes that do not divide 3^k - 2 for any k.
%C That the sequence is infinite can be proved using a theorem in the reference.
%C This sequence contains all primes congruent to 11 or 13 modulo 24, thus is infinite according to Dirichlet's theorem on arithmetic progressions. - _Jianing Song_, Dec 25 2018
%D A. K. Devaraj, "Euler's generalization of Fermat's theorem-a further generalization", in ISSN #1550-3747, Proceedings of Hawaii Intl Conference on Statistics, Mathematics & Related Fields, 2004.
%H Charles R Greathouse IV, <a href="/A123239/b123239.txt">Table of n, a(n) for n = 1..10000</a>
%t Select[Prime[Range[135]],!MemberQ[Table[PowerMod[3,k,# ],{k,#-1}],2]&] (* _Farideh Firoozbakht_, Oct 11 2006 *)
%o (PARI) is(n)=if(n<4, return(n>1)); if(!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_, Jul 07 2013
%K nonn
%O 1,1
%A _A.K. Devaraj_, Oct 07 2006
%E More terms from _Don Reble_, Oct 07 2006