login
A243197
Least number k such that (k+1)^prime(n) - (k-1)^prime(n) is a semiprime.
0
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, 34, 2, 112, 24, 6, 4, 62, 188, 172, 96, 194, 46, 18, 30, 544, 168, 204, 52, 126, 186, 32, 24, 4, 60, 352, 94, 12, 250, 32, 28, 76, 136, 10, 2794, 4, 46, 16, 178, 58, 886, 104, 74, 54
OFFSET
1,2
COMMENTS
a(n) is even for n > 1.
(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.
EXAMPLE
(6+1)^(prime(3))-(6-1)^(prime(3)) = 7^5-5^5 = 13682 = 2*6841. Thus a(3) = 6.
MATHEMATICA
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 *)
PROG
(PARI) a(n)=for(k=1, 10^4, if(ispseudoprime(((k+1)^prime(n)-(k-1)^prime(n))/2), return(k)))
n=1; while(n<100, print1(a(n), ", "); n+=1)
CROSSREFS
Sequence in context: A136698 A223473 A292522 * A319048 A066900 A356016
KEYWORD
nonn
AUTHOR
Derek Orr, Jun 01 2014
STATUS
approved