login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A157829 Numbers k such that k! - (k-1)! + (k-2)! + 1 is prime. 0

%I

%S 2,5,7,11,13,16,22,29,43,56,67,83,85,107,317,325,517,1660,2010,2368,

%T 4483,4697

%N Numbers k such that k! - (k-1)! + (k-2)! + 1 is prime.

%e a(11) = 11! - 10! + 9! + 1 = 36650881 (prime).

%e a(16) = 16! - 15! + 14! + 1 = 19702293811201 (prime).

%p a := proc (n) if isprime(factorial(n-2)*((n-1)^2+1)+1) = true then n else end if end proc: seq(a(n), n = 2 .. 700); # _Emeric Deutsch_, Mar 18 2009

%o (PARI) is(n)=ispseudoprime(1+(n^2-2*n+2)*(n-2)!) \\ _Charles R Greathouse IV_, Dec 27 2013

%o (PFGW) ABC2 $a!-($a-1)!+($a-2)!+1

%o a: from 2 to 10000

%o _Charles R Greathouse IV_, Dec 27 2013

%K nonn

%O 1,1

%A _Kyle D. Balliet_, Mar 07 2009

%E More terms from _Emeric Deutsch_, Mar 18 2009

%E a(18)-a(22) from _Charles R Greathouse IV_, Dec 27 2013

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 17 16:06 EDT 2021. Contains 348065 sequences. (Running on oeis4.)