This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A217612 Difference between n-th prime and the smallest semiprime greater than it. 1
 2, 1, 1, 2, 3, 1, 4, 2, 2, 4, 2, 1, 5, 3, 2, 2, 3, 1, 2, 3, 1, 3, 2, 2, 9, 5, 3, 4, 2, 2, 2, 2, 4, 2, 6, 4, 1, 3, 2, 4, 4, 2, 3, 1, 4, 2, 2, 3, 8, 6, 2, 8, 6, 2, 2, 2, 5, 3, 1, 6, 4, 2, 2, 3, 1, 2, 3, 2, 8, 6, 2, 2, 4, 4, 2, 3, 2, 1, 2, 2, 3, 1, 6, 4, 6, 2, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Similar to A121885, but with smallest semiprime greater than it. LINKS Antonio Roldán, Table of n, a(n) for n = 1..1229 FORMULA a(n) = A102414(n) - A000040(n). EXAMPLE a(7) = 4, because 17 is the seventh prime and 17+1 = 18 = 2*3^2, 17+2 = 19 = 19 and 17+3 = 20 = 2^2*5 are not semiprimes, but 17+4 = 21 = 3*7 is a semiprime. MATHEMATICA SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; Table[i = Prime[n] + 1; While[! SemiPrimeQ[i], i++]; i - Prime[n], {n, 87}] (* T. D. Noe, Oct 08 2012 *) PROG (PARI) m=0; forprime(n=2, 10000, k=0; while(bigomega(n+k)<>2, k=k+1); m=m+1; write("B217612.txt", m, "  ", k)) \\ Antonio Roldán, Oct 08 2012 CROSSREFS Sequence in context: A133771 A288158 A319522 * A029254 A063740 A072782 Adjacent sequences:  A217609 A217610 A217611 * A217613 A217614 A217615 KEYWORD nonn AUTHOR Antonio Roldán, Oct 08 2012 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 12 23:21 EST 2019. Contains 329963 sequences. (Running on oeis4.)