login
A242041
Number of k >= 1 that make n + k! and n - k! both prime.
1
0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2, 0, 2, 0, 1, 0, 0, 1, 1, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0
OFFSET
1,35
COMMENTS
0 <= a(n) <= min{A125162(n), A175940(n)}.
a(n) < A020639(n). - Robert Israel, Aug 12 2014
LINKS
MAPLE
a:= n -> nops(select(k -> isprime(n+k!) and isprime(n-k!),
[$1 ..min(numtheory:-factorset(n))-1])):
0, seq(a(n), n=2..100); # Robert Israel, Aug 12 2014
PROG
(PARI)
a(n)=c=0; for(k=1, n, if(ispseudoprime(n+k!)&&ispseudoprime(n-k!), c++)); return(c)
vector(100, n, a(n))
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Aug 12 2014
STATUS
approved