cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A241536 Smallest k>=1 such that prime(n)+k and prime(n)-k are both semiprimes, or a(n)=0 if there is no such k.

This page as a plain text file.
%I A241536 #19 Dec 09 2016 10:55:50
%S A241536 0,0,1,3,0,9,8,15,2,4,27,2,8,8,8,2,10,4,2,6,4,14,28,2,32,10,8,12,14,2,
%T A241536 6,2,4,6,6,8,2,20,34,4,24,4,14,8,12,14,2,14,8,8,14,20,6,2,8,4,20,18,
%U A241536 10,14,16,2,2,8,8,12,4,2,8,22,12,18,26,8,2,12,18
%N A241536 Smallest k>=1 such that prime(n)+k and prime(n)-k are both semiprimes, or a(n)=0 if there is no such k.
%C A241536 If a(n)=2, then prime(n)+2 and prime(n)-2 are both semiprimes; that is, prime(n) belongs to A063643. - _Michel Marcus_, Mar 26 2015
%t A241536 sks[n_]:=Module[{k=1,p=Prime[n]},While[PrimeOmega[p+k]!=2||PrimeOmega[p-k]!=2||p-k<4,If[p-k<3,Break[]];k++];If[p-k<4,0,k]]; Array[sks,80] (* _Harvey P. Dale_, Dec 09 2016 *)
%o A241536 (PARI) a(n) = {p = prime(n); for (k=1, p-1, if ((bigomega(p-k)==2) && (bigomega(p+k) == 2), return (k));); return (0);} \\ _Michel Marcus_, Apr 25 2014
%Y A241536 Cf. A001358, A241531, A241533, A241535.
%K A241536 nonn
%O A241536 1,4
%A A241536 _Vladimir Shevelev_, Apr 25 2014
%E A241536 More terms from _Michel Marcus_, Apr 25 2014
%E A241536 Name edited by _Michel Marcus_, Mar 26 2015