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.

User: Julio Cesar Hernandez-Castro

Julio Cesar Hernandez-Castro's wiki page.

Julio Cesar Hernandez-Castro has authored 1 sequences.

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

Original entry on oeis.org

0, 2, 3, 5, 6, 18, 44, 113, 2615, 16914
Offset: 1

Author

Keywords

Comments

Some of the larger entries may only correspond to probable primes.
a(11) > 30000. - Michael S. Branicky, Apr 20 2025

Examples

			6! + 2*6 + 1 = 733 is prime, so 6 is in the sequence.
		

Crossrefs

Cf. A073308 (k!+k+1 is prime).

Programs

  • Magma
    [ n: n in [0..1000] | IsPrime(Factorial(n)+2*n+1) ]; // Klaus Brockhaus, Jul 02 2011
    
  • Maple
    select(p -> isprime(factorial(p) + 2*p + 1), [$0 .. 1000]) # Reza K Ghazi, Jul 11 2021
  • Mathematica
    Select[Range[0, 1000], PrimeQ[#! + 2*# + 1] &] (* Reza K Ghazi, Jul 11 2021 *)
  • PARI
    for(n=0,10^5,N=n!+2*n+1;if(ispseudoprime(N),print1(n,", ")));
    /* use isprime() for stricter checking */ /* Joerg Arndt, Jul 03 2011 */
    
  • Python
    from sympy import isprime
    factor = 1;
    for i in range(0, 10000):
        if i < 2:
            factor = 1
        else:
            factor = factor*i
        if isprime(factor + 2*i + 1):
            print(i, end=', ')
    
  • SageMath
    [p for p in range(1000) if is_prime(factorial(p)+2*p+1)] # Reza K Ghazi, Jul 11 2021

Extensions

0 added by Arkadiusz Wesolowski, Jun 29 2011
a(9) from Arkadiusz Wesolowski, Jul 02 2011
a(10) from Charles R Greathouse IV, Oct 14 2011