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”).

A060266
Difference between 2n and the following prime.
8
1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 5, 3, 1, 1, 5, 3, 1, 3, 1, 1, 3, 1, 5, 3, 1, 5, 3, 1, 1, 5, 3, 1, 3, 1, 1, 5, 3, 1, 3, 1, 5, 3, 1, 7, 5, 3, 1, 3, 1, 1, 3, 1, 1, 3, 1, 13, 11, 9, 7, 5, 3, 1, 3, 1, 5, 3, 1, 1, 9, 7, 5, 3, 1, 1, 5, 3, 1, 5, 3, 1, 3, 1, 5, 3, 1, 5, 3, 1, 1, 9, 7, 5, 3, 1, 1, 3, 1, 1, 11, 9, 7, 5
OFFSET
1,4
LINKS
FORMULA
Conjecture: Limit_{n->oo} (Sum_{k=1..n} a(k)) / (Sum_{k=1..n} log(2*k)) = 1. - Alain Rocchelli, Oct 24 2023
MAPLE
with(numtheory): [seq(nextprime(2*i)-2*i, i=1..256)];
MATHEMATICA
d2n[n_]:=Module[{c=2n}, NextPrime[c]-c]; Array[d2n, 120] (* Harvey P. Dale, May 14 2011 *)
Table[NextPrime@ # - # &[2 n], {n, 120}] (* Michael De Vlieger, Feb 18 2017 *)
PROG
(PARI) a(n) = nextprime(2*n+1) - 2*n; \\ Michel Marcus, Feb 19 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Mar 23 2001
STATUS
approved