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!)
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. 2
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, 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, 10, 14, 16, 2, 2, 8, 8, 12, 4, 2, 8, 22, 12, 18, 26, 8, 2, 12, 18 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
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
LINKS
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
Sequence in context: A197689 A201942 A181831 * A080407 A197335 A248885
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Apr 25 2014
EXTENSIONS
More terms from Michel Marcus, Apr 25 2014
Name edited by Michel Marcus, Mar 26 2015
STATUS
approved

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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)