This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A121885 Excess of n-th prime over previous semiprime. 2
 1, 1, 1, 3, 2, 4, 1, 3, 5, 2, 2, 4, 1, 2, 1, 3, 2, 2, 4, 2, 1, 2, 2, 6, 8, 1, 3, 2, 4, 2, 3, 5, 3, 5, 2, 2, 1, 4, 1, 3, 4, 6, 3, 5, 2, 2, 1, 3, 7, 2, 4, 2, 3, 1, 2, 4, 3, 3, 5, 2, 2, 2, 4, 3, 2, 2, 1, 3, 7, 1, 2, 2, 2, 1, 3, 2, 3, 2, 2, 4, 4, 6, 2, 6, 2, 3, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 3,4 COMMENTS See: A102415 Greatest semiprime less than n-th prime. See: A102414 Smallest semiprime greater than n-th prime. LINKS T. D. Noe, Table of n, a(n) for n = 3..10000 FORMULA a(n) = Min{A000040(n)-s for s < A000040(n) and s in A001358(k)}. a(n) = A000040(n) - A102415(n). 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--]; Prime[n] - i, {n, 3, 100}] (* T. D. Noe, Oct 08 2012 *) eps[n_]:=Module[{c=n-1}, While[PrimeOmega[c]!=2, c--]; n-c]; Table[eps[n], {n, Prime[Range[3, 90]]}] (* Harvey P. Dale, Aug 12 2014 *) PROG (PARI) dsemi(n)= { local(k=0); if(isprime(n), k=0; while(bigomega(n-k)<>2&&k

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 August 18 20:02 EDT 2019. Contains 326109 sequences. (Running on oeis4.)