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!)
A243197 Least number k such that (k+1)^prime(n) - (k-1)^prime(n) is a semiprime. 0

%I #9 Jun 05 2015 18:57:25

%S 1,2,6,2,12,2,14,4,4,84,4,62,80,12,4,78,20,26,78,2,78,112,356,96,76,

%T 34,2,112,24,6,4,62,188,172,96,194,46,18,30,544,168,204,52,126,186,32,

%U 24,4,60,352,94,12,250,32,28,76,136,10,2794,4,46,16,178,58,886,104,74,54

%N Least number k such that (k+1)^prime(n) - (k-1)^prime(n) is a semiprime.

%C a(n) is even for n > 1.

%C (k+1)^M-(k-1)^M is divisible by 2 for any n. Thus, if it is a semiprime, then ((k+1)^M-(k-1)^M)/2 must be prime. This is only prime if M is also prime. Thus we may assume M is a prime.

%e (6+1)^(prime(3))-(6-1)^(prime(3)) = 7^5-5^5 = 13682 = 2*6841. Thus a(3) = 6.

%t lnk[n_]:=Module[{k=1},While[PrimeOmega[(k+1)^n-(k-1)^n]!=2,k++];k]; lnk/@Prime[Range[70]] (* _Harvey P. Dale_, Jun 05 2015 *)

%o (PARI) a(n)=for(k=1,10^4,if(ispseudoprime(((k+1)^prime(n)-(k-1)^prime(n))/2),return(k)))

%o n=1;while(n<100,print1(a(n),", ");n+=1)

%K nonn

%O 1,2

%A _Derek Orr_, Jun 01 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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)