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 #22 Sep 08 2022 08:45:09
%S 2,3,4,6,7,8,10,15,21,24,36,49,51,86,116,134,176,284,345,498,544,649,
%T 844,1051,1171,1384,1497,1514,1638,1856,2860,2890,3235,3584,4047,5990,
%U 7729,8935,9907,15241,15864,17629,19264,28239,43730,46879,65379,89468,128787,139976
%N Numbers n such that 3^n + 2^(n-1) is prime.
%C a(51) > 2*10^5. - _Robert Price_, May 06 2016
%e n=4: 89 = 2*2*2 + 3*3*3*3 is prime.
%e n=15: 3^15 + 2^14 = 14365291 is prime.
%t Do[ If[ PrimeQ[3^n + 2^(n - 1)], Print[n]], {n, 7650}] (* _Robert G. Wilson v_, May 24 2004 *)
%t Select[Range[6000], PrimeQ[3^# + 2^(#-1)] &] (* _Vincenzo Librandi_, Mar 20 2015 *)
%o (Magma) [n: n in [0..1000] | IsPrime(3^n + 2^(n-1))]; // _Vincenzo Librandi_, Mar 20 2015
%o (PARI) is(n)=isprime(3^n+2^(n-1)) \\ _Charles R Greathouse IV_, Feb 17 2017
%Y Cf. A082101, A082102, A095906, A093717, A093793, A093765, A096185, A093794, A093795, A096186.
%K nonn
%O 1,1
%A _Labos Elemer_, Apr 14 2003
%E Edited and extended by _Robert G. Wilson v_, May 25 2004
%E Edited by _N. J. A. Sloane_, Sep 15 2008 at the suggestion of _R. J. Mathar_
%E a(37)-a(50) from _Robert Price_, May 06 2016