Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Mar 06 2023 09:34:33
%S 1,2,3,4,5,9,10,40,82,159,177,525,880,2577,3771,11872
%N Numbers n such that 3^(2n-1)+3^n+1 is prime.
%C 3^(2n-1)+3^n+1 is an Aurifeuillean factor of 3^(6n-3)+1, sometimes written as M(3,6n-3).
%C h=2n-1 must be a power of 3 or a prime congruent to 5 or 7 (mod 12). For all other h, there are algebraic factorizations: for prime p>3, M(3,pq) are divisible by L(3,p) or M(3,p).
%C No other terms up to 41000 exist.
%C a(17) > 10^5. - _Robert Price_, Mar 20 2014
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/AurifeuilleanFactorization.html">Aurifeuillean Factorization</a>.
%e 5 is a term because 3^(5*2-1) + 3^5 + 1 = 19927 is prime.
%t Do[ If[ PrimeQ[3^(2*n-1)+3^n+1], Print[n]], {n, 0, 10000}]
%o (PARI) for(k=1, 1000, if(isprime(3^(2*k-1)+3^k+1), print(k)))
%Y Cf. A176007 for Aurifeuillean co-factor L(3, 6n-3).
%K hard,more,nonn
%O 1,2
%A _Serge Batalov_, Apr 09 2010