[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A033559
a(n) = (q - p)/2, where p is the largest prime < n and q is the smallest prime > n.
2
1, 2, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 5, 3, 3, 3, 3, 3, 4, 1, 4, 3, 3, 3, 3, 3, 5, 2, 2, 2, 3, 1, 3, 2, 2, 2, 5, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 4, 1, 4, 3, 3, 3, 3, 3, 5, 2, 2, 2, 3, 1, 4, 3, 3, 3, 3, 3, 5, 2, 2, 2, 5, 3, 3, 3, 3, 3, 7, 4, 4, 4, 4, 4, 4, 4, 6, 2, 2, 2
OFFSET
4,2
MATHEMATICA
a[n_] := (NextPrime[n] - NextPrime[n, -1])/2; Table[a[n], {n, 4, 100}] (* Jean-François Alcover, Apr 16 2013 *)
CROSSREFS
Sequence in context: A377168 A273568 A140720 * A279027 A103151 A035221
KEYWORD
nonn
EXTENSIONS
More terms from Ben Paul Thurston, Mar 30 2007
STATUS
approved