cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A263469 Numbers k such that k! + 2^k + 3 or k! + 2^k - 3 is prime.

Original entry on oeis.org

0, 2, 3, 4, 5, 6, 7, 15, 17, 21, 42, 57, 99, 312, 372, 15030
Offset: 1

Views

Author

Altug Alkan, Oct 19 2015

Keywords

Comments

Both k! + 2^k + 3 and k! + 2^k - 3 are prime for k = 3 or 4. Are there any others?
No more terms below 10^4. - Charles R Greathouse IV, Nov 17 2015

Examples

			For k = 0, k! + 2^k + 3 = 0! + 2^0 + 3 = 5, which is prime.
For k = 2, k! + 2^k - 3 = 2! + 2^2 - 3 = 3, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 10^3], Or[PrimeQ[#! + 2^# + 3], PrimeQ[#! + 2^# - 3]] &] (* Michael De Vlieger, Oct 20 2015 *)
  • 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

Extensions

a(14)-a(15) from Michael De Vlieger, Oct 20 2015
a(16) from Michael S. Branicky, Jul 25 2024

A263482 Numbers k such that k! + 2^k + 11 or k! + 2^k - 11 is prime.

Original entry on oeis.org

0, 2, 3, 4, 5, 6, 7, 9, 15, 34, 41, 79, 99, 379, 2183
Offset: 1

Views

Author

Altug Alkan, Oct 19 2015

Keywords

Comments

Is there some k such that k! + 2^k + 11 and k! + 2^k - 11 are prime?
a(16) > 20000. - Michael S. Branicky, Jul 25 2024

Examples

			For k = 0, k! + 2^k + 11 = 0! + 2^0 + 11 = 13, which is prime.
For k = 3, k! + 2^k - 11 = 3! + 2^3 - 11 = 3, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 400], Or[PrimeQ[#! + 2^# + 11], PrimeQ[#! + 2^# - 11]] &] (* Michael De Vlieger, Nov 17 2015 *)
    Select[Range[0,500],AnyTrue[#!+2^#+{11,-11},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 05 2019 *)
  • PARI
    for(n=0, 1e3, if(isprime(n!+2^n-11) || isprime(n!+2^n+11), print1(n", ")))
    
  • PARI
    is(n)=my(N=n!+2^n); ispseudoprime(N-11) || ispseudoprime(N+11) \\ Charles R Greathouse IV, Nov 17 2015

Extensions

a(14) from Charles R Greathouse IV, Nov 17 2015
a(15) from Michael S. Branicky, Jun 17 2023
Showing 1-2 of 2 results.