The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A192367 Numbers k such that k! + 2*k + 1 is prime. 0
0, 2, 3, 5, 6, 18, 44, 113, 2615, 16914 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Some of the larger entries may only correspond to probable primes.
LINKS
EXAMPLE
6! + 2*6 + 1 = 733 is prime, so 6 is in the sequence.
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 *)
PROG
(Python)
factor=1;
for i in range(2, 10000):
factor=factor*i
if is_probable_prime(factor+2*i+1): #A Miller-Rabin primality test, with k=10
print i
(Magma) [ n: n in [0..1000] | IsPrime(Factorial(n)+2*n+1) ]; // Klaus Brockhaus, Jul 02 2011
(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 */
(SageMath) [p for p in range(1000) if is_prime(factorial(p)+2*p+1)] # Reza K Ghazi, Jul 11 2021
CROSSREFS
Cf. A073308 (k!+k+1 is prime).
Sequence in context: A293027 A276353 A109628 * A227230 A102977 A238335
KEYWORD
hard,nonn
AUTHOR
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
STATUS
approved

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 May 19 14:10 EDT 2024. Contains 372697 sequences. (Running on oeis4.)