This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A072680 Difference between (least prime >= n) and (largest prime <= n). 2
 0, 0, 2, 0, 2, 0, 4, 4, 4, 0, 2, 0, 4, 4, 4, 0, 2, 0, 4, 4, 4, 0, 6, 6, 6, 6, 6, 0, 2, 0, 6, 6, 6, 6, 6, 0, 4, 4, 4, 0, 2, 0, 4, 4, 4, 0, 6, 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 0, 2, 0, 6, 6, 6, 6, 6, 0, 4, 4, 4, 0, 2, 0, 6, 6, 6, 6, 6, 0, 4, 4, 4, 0, 6, 6, 6, 6, 6, 0, 8, 8, 8, 8, 8, 8, 8, 0, 4, 4, 4, 0, 2, 0, 4, 4, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,3 COMMENTS a(n)=0 iff n is prime. LINKS FORMULA a(n) = A057427(n - A007917(n)) * A001223(A049084(A007917(n))). MATHEMATICA f[n_]:=If[PrimeQ[n], 0, NextPrime[n]-NextPrime[n, -1]]; Array[f, 110, 2] (* Harvey P. Dale, Sep 22 2011 *) PROG (MuPAD) numlib::prevprime(i)*(-1)-nextprime(i)*(-1)\$ i = 2..106 // Zerinvary Lajos, Feb 26 2007 CROSSREFS a(n) = A007918(n) - A007917(n). Cf. A072681, A013633. Sequence in context: A029186 A283023 A288182 * A067770 A079200 A011420 Adjacent sequences:  A072677 A072678 A072679 * A072681 A072682 A072683 KEYWORD nonn AUTHOR Reinhard Zumkeller, Jul 01 2002 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 21 12:27 EST 2018. Contains 299411 sequences. (Running on oeis4.)