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.

A261714 Numbers n such that n! + 2^n + 1 is prime.

Original entry on oeis.org

0, 2, 4, 8, 72
Offset: 1

Views

Author

Altug Alkan, Aug 29 2015

Keywords

Comments

Inspired by A007611.
First three prime numbers of the form n! + 2^n +1 with positive n value are 7, 41, 40577.
a(5) > 30000. - Giovanni Resta, Aug 30 2015

Examples

			For n=2, n! + 2^n + 1 = 2! + 2^2 + 1 = 7, which is prime.
		

Crossrefs

Cf. A007611.

Programs

  • Magma
    [n: n in [1..300] | IsPrime(Factorial(n)+2^n+1)]; // Vincenzo Librandi, Aug 30 2015
    
  • Mathematica
    Select[Range@ 2000, PrimeQ[#! + 2^# + 1] &] (* Michael De Vlieger, Aug 29 2015 *)
  • PARI
    for(n=1, 1e3, if(isprime(k=(n!+2^n+1)), print1(n", ")))
    
  • PFGW
    ABC2 $a! + 2^$a + 1
    a: from 0 to 30000
    Charles R Greathouse IV, Sep 08 2015