login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

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

Table of n, a(n) for n=2..106.

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: A179461 A238763 A029186 * 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 | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified November 28 04:44 EST 2014. Contains 250286 sequences.