A283653 Numbers k such that 3^k + (-2)^k is prime.
0, 2, 3, 4, 5, 17, 29, 31, 53, 59, 101, 277, 647, 1061, 2381, 2833, 3613, 3853, 3929, 5297, 7417, 90217, 122219, 173191, 256199, 336353, 485977, 591827, 1059503
Offset: 1
Examples
4 is in this sequence because 3^4 + (-2)^4 = 97 is prime.
Programs
-
Magma
[n: n in [0..1000] | IsPrime(3^n+(-2)^n)];
-
Mathematica
Select[Range[0, 10000], PrimeQ[3^# + (-2)^#] &] (* G. C. Greubel, Jul 29 2018 *)
-
PARI
is(n)=isprime(3^n+(-2)^n) \\ Charles R Greathouse IV, Mar 16 2017
Comments