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-1 of 1 results.

A261730 Values of n such that prime(n)! - n! + 1 is a prime number.

Original entry on oeis.org

1, 2, 8, 85, 308
Offset: 1

Views

Author

Altug Alkan, Aug 30 2015

Keywords

Comments

Inspired by A261457.
Initial primes of the form prime(n)! - n! + 1 are 2, 5, 121645100408791681.

Examples

			For n=1, prime(1)!-1!+1 = 2 is a prime number.
		

Crossrefs

Cf. A261457.

Programs

  • Magma
    [n: n in [1..80] | IsPrime(Factorial(NthPrime(n))-Factorial(n)+1)]; // Vincenzo Librandi, Aug 31 2015
  • Mathematica
    Select[Range[400], PrimeQ[Prime[#]! - #! + 1] &] (* Vincenzo Librandi, Aug 31 2015 *)
  • PARI
    for(n=1, 1e3, if(isprime(prime(n)!-n!+1), print1(n", ")))
    

Extensions

a(4)-a(5) from Giovanni Resta, Aug 30 2015
Showing 1-1 of 1 results.