OFFSET
1,5
COMMENTS
For a(n) > 0, a(n)! < n for all n. Thus a(n) = 0 is definite.
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 1..10000
EXAMPLE
13 + 1! and 13 - 1! are not both prime.
13 + 2! and 13 - 2! are not both prime.
13 + 3! and 13 - 3! are both prime (19 and 7). Thus a(13) = 3.
PROG
(PARI)
a(n)=for(k=1, n, if(ispseudoprime(n-k!)&&ispseudoprime(n+k!), return(k)))
vector(150, n, a(n))
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Jul 30 2014
STATUS
approved