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.

A256594 Numbers k such that k!*2^k + 1 is prime.

Original entry on oeis.org

0, 1, 259, 16708, 18655, 26304, 61999, 110251
Offset: 1

Views

Author

Robert Price, Apr 03 2015

Keywords

Examples

			0 is in the sequence since 0!*2^0 + 1 = 2 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..3*10^2] | IsPrime(Factorial(n)*2^n+1)]; // Vincenzo Librandi, Apr 05 2015
    
  • Mathematica
    Select[Range[0, 20000], PrimeQ[2^#*#! + 1] &]
  • PARI
    for(n=0,300,if(ispseudoprime(n!*2^n+1),print1(n,", "))) \\ Derek Orr, Apr 05 2015
    
  • Python
    from sympy import factorial, isprime
    for n in range(0,300):
        if isprime(factorial(n)*(2**n)+1):
            print(n, end=', ') # Stefano Spezia, Dec 06 2018

Formula

a(n) = A080778(n+1)/2 for n >= 2. - Amiram Eldar, Dec 06 2018

Extensions

a(6)-a(8), from the data at A080778, added by Amiram Eldar, Dec 06 2018