The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A174326 Exactly one of 3^n +- 2^n is prime. 1
 0, 1, 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Either (but not both) of 3^n - 2^n and 3^n + 2^n is prime. - Harvey P. Dale, Sep 16 2016 If 3^n + 2^n is prime then n must be a power of 2, and 3^n + 2^n is a generalized Fermat prime. It is conjectured that 3^n + 2^n is prime only for n=1,2,4: see A082101. - Robert Israel, Mar 15 2017, edited May 18 2017. LINKS Table of n, a(n) for n=1..29. EXAMPLE a(1)=0 because 3^0 - 2^0 = 0 = nonprime and 3^0 + 2^0 = 2 = prime; a(2)=1 because 3^1 - 2^1 = 1 = nonprime and 3^1 + 2^1 = 5 = prime; a(3)=3 because 3^3 - 2^3 = 19 = prime and 3^3 + 2^3 = 35 = nonprime. MATHEMATICA epQ[n_]:=Module[{a=3^n, b=2^n}, Sort[PrimeQ[{a+b, a-b}]]=={False, True}]; Select[Range[0, 4000], epQ] (* Harvey P. Dale, Sep 16 2016 *) PROG (PARI) is(n)=isprime(3^n+2^n)+isprime(3^n-2^n)==1 \\ Charles R Greathouse IV, Mar 19 2017 CROSSREFS Cf. A283653, A082101, A057468. Sequence in context: A298225 A278919 A173061 * A224890 A263810 A249541 Adjacent sequences: A174323 A174324 A174325 * A174327 A174328 A174329 KEYWORD nonn AUTHOR Juri-Stepan Gerasimov, Mar 15 2010 EXTENSIONS 9 and 11 removed by R. J. Mathar, Mar 29 2010 More terms from Harvey P. Dale, Sep 16 2016 a(20) from Robert G. Wilson v, Mar 15 2017 a(21) to a(29) (using data from A057468) from Robert Israel, May 18 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 12 11:16 EDT 2024. Contains 371633 sequences. (Running on oeis4.)