login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261730 Values of n such that prime(n)! - n! + 1 is a prime number. 0

%I #16 Sep 08 2022 08:46:13

%S 1,2,8,85,308

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

%C Inspired by A261457.

%C Initial primes of the form prime(n)! - n! + 1 are 2, 5, 121645100408791681.

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

%t Select[Range[400], PrimeQ[Prime[#]! - #! + 1] &] (* _Vincenzo Librandi_, Aug 31 2015 *)

%o (PARI) for(n=1, 1e3, if(isprime(prime(n)!-n!+1), print1(n", ")))

%o (Magma) [n: n in [1..80] | IsPrime(Factorial(NthPrime(n))-Factorial(n)+1)]; // _Vincenzo Librandi_, Aug 31 2015

%Y Cf. A261457.

%K nonn,more

%O 1,2

%A _Altug Alkan_, Aug 30 2015

%E a(4)-a(5) from _Giovanni Resta_, Aug 30 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 14:13 EDT 2024. Contains 371960 sequences. (Running on oeis4.)