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!)
A157829 Numbers k such that k! - (k-1)! + (k-2)! + 1 is prime. 0
2, 5, 7, 11, 13, 16, 22, 29, 43, 56, 67, 83, 85, 107, 317, 325, 517, 1660, 2010, 2368, 4483, 4697 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(11) = 11! - 10! + 9! + 1 = 36650881 (prime).
a(16) = 16! - 15! + 14! + 1 = 19702293811201 (prime).
MAPLE
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
PROG
(PARI) is(n)=ispseudoprime(1+(n^2-2*n+2)*(n-2)!) \\ Charles R Greathouse IV, Dec 27 2013
(PFGW) ABC2 $a!-($a-1)!+($a-2)!+1
a: from 2 to 10000
CROSSREFS
Sequence in context: A191406 A322969 A229470 * A020581 A081259 A177512
KEYWORD
nonn
AUTHOR
Kyle D. Balliet, Mar 07 2009
EXTENSIONS
More terms from Emeric Deutsch, Mar 18 2009
a(18)-a(22) from Charles R Greathouse IV, Dec 27 2013
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 April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)