OFFSET
1,1
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
Charles R Greathouse IV, Dec 27 2013
CROSSREFS
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