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!)
A242041 Number of k >= 1 that make n + k! and n - k! both prime. 1

%I #18 Aug 17 2014 02:57:27

%S 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,

%T 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,

%U 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

%N Number of k >= 1 that make n + k! and n - k! both prime.

%C 0 <= a(n) <= min{A125162(n), A175940(n)}.

%C a(n) < A020639(n). - _Robert Israel_, Aug 12 2014

%H Jens Kruse Andersen, <a href="/A242041/b242041.txt">Table of n, a(n) for n = 1..10000</a>

%p a:= n -> nops(select(k -> isprime(n+k!) and isprime(n-k!),

%p [$1 ..min(numtheory:-factorset(n))-1])):

%p 0, seq(a(n),n=2..100); # _Robert Israel_, Aug 12 2014

%o (PARI)

%o a(n)=c=0;for(k=1,n,if(ispseudoprime(n+k!)&&ispseudoprime(n-k!),c++));return(c)

%o vector(100,n,a(n))

%Y Cf. A020639, A125162, A175940.

%K nonn

%O 1,35

%A _Derek Orr_, Aug 12 2014

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 30 12:47 EDT 2024. Contains 372134 sequences. (Running on oeis4.)