login

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”).

Primes p such that 3^p - 2^p - 2 is also prime.
1

%I #36 Sep 11 2024 14:42:12

%S 2,3,43,61,5563,10093

%N Primes p such that 3^p - 2^p - 2 is also prime.

%C The associated 3^p-2^p-2 are in A162713.

%C The list of k such that 3^k-2^k-2 is prime is: 2, 3, 43, 61, 63, 1369, ..., where 63 and 1369 are not prime.

%C No other term <= 15000. - _Emeric Deutsch_, Aug 03 2009

%C a(7) > 25000. - _Tyler NeSmith_, Jul 10 2021

%C a(7) > 2*10^5. - _Michael S. Branicky_, Sep 11 2024

%e 2 is in the sequence because 3^2-2^2-2 = 3 is prime.

%e 3 is in the sequence because 3^3-2^3-2 = 17 is prime.

%p a := proc(n) if isprime(n) and isprime(3^n-2^n-2) then n end if end proc:

%p seq(a(n), n = 1 .. 15000); # _Emeric Deutsch_, Aug 03 2009

%t Select[Prime[Range[11000]], PrimeQ[3^# - 2^# - 2] &] (* _Vincenzo Librandi_, Sep 25 2015 *)

%o (PARI) forprime(p=2, 1e3, if (isprime(3^p-2^p-2), print1(p, ", "))) \\ _Altug Alkan_, Sep 25 2015

%o (Magma) [p: p in PrimesUpTo(1000) | IsPrime(3^p-2^p-2)];// _Vincenzo Librandi_, Sep 26 2015

%Y Cf. A162713.

%K nonn,more

%O 1,1

%A _Vincenzo Librandi_, Jul 11 2009

%E Edited by _R. J. Mathar_, Jul 26 2009

%E a(5)-a(6) from _Emeric Deutsch_, Aug 03 2009