login
Primes of form (3^n+7)/2.
2

%I #11 Sep 08 2022 08:45:50

%S 5,17,1097,304133393856678854559841996309430657

%N Primes of form (3^n+7)/2.

%H Vincenzo Librandi, <a href="/A172996/b172996.txt">Table of n, a(n) for n = 1..7</a>

%F a(n) = (3^A172995(n)+7)/2.

%t Select[Table[(3^n + 7)/2, {n, 500}], PrimeQ] (* _Vincenzo Librandi_, Sep 24 2015 *)

%o (Magma) [a: n in [0..500] | IsPrime(a) where a is (3^n+7) div 2]; // _Vincenzo Librandi_, Sep 24 2015

%o (PARI) for(n=1, 1e3, if(isprime(k=(3^n+7)/2), print1(k", "))) \\ _Altug Alkan_ Sep 24 2015

%Y Cf. A172995.

%K nonn

%O 1,1

%A _Vincenzo Librandi_, Feb 07 2010