OFFSET
1,2
LINKS
Jinyuan Wang, Table of n, a(n) for n = 1..1000
EXAMPLE
[3,5] contains 4, so a(1)=4.
[7,11] contains 8,9,10, so a(2)=3.
For the third term in the sequence, use prime pair [13,17]. There are three composites between 13 and 17, thus the third term = 3.
MATHEMATICA
Table[Prime[n + 1] - Prime[n] - 1, {n, 2, 100, 2}] (* Hartmut F. W. Hoft, Apr 24 2015 *)
PROG
(PARI) a(n) = prime(2*n+1)-prime(2*n)-1; \\ Jinyuan Wang, Jul 09 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Woodward, Apr 09 2015
EXTENSIONS
Corrected and extended by Hartmut F. W. Hoft, Apr 24 2015
More terms from Robert G. Wilson v, May 03 2015
STATUS
approved