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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A263469 Numbers n such that n! + 2^n + 3 or n! + 2^n - 3 is prime. 1
0, 2, 3, 4, 5, 6, 7, 15, 17, 21, 42, 57, 99, 312, 372 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Both n! + 2^n + 3 and n! + 2^n - 3 are prime for n = 3 or 4. Are there any others?
No more terms below 10^4. - Charles R Greathouse IV, Nov 17 2015
LINKS
EXAMPLE
For n=0, n! + 2^n + 3 = 0! + 2^0 + 3 = 5, which is prime.
For n=2, n! + 2^n - 3 = 2! + 2^2 - 3 = 3, which is prime.
MATHEMATICA
Select[Range[0, 10^3], Or[PrimeQ[#! + 2^# + 3], PrimeQ[#! + 2^# - 3]] &] (* Michael De Vlieger, Oct 20 2015 *)
PROG
(PARI) for(n=0, 1e3, if(isprime(n!+2^n-3) || isprime(n!+2^n+3), print1(n", ")))
(PARI) is(n)=my(N=n!+2^n); ispseudoprime(N-3) || ispseudoprime(N+3) \\ Charles R Greathouse IV, Nov 17 2015
CROSSREFS
Sequence in context: A115308 A171649 A146028 * A165804 A055402 A274839
KEYWORD
nonn,more
AUTHOR
Altug Alkan, Oct 19 2015
EXTENSIONS
a(14)-a(15) from Michael De Vlieger, Oct 20 2015
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)