OFFSET
1,5
EXAMPLE
For the third term in the sequence, use prime pair (11,13). Only composite that lies between is "12", thus the third value in the sequence is "1".
MATHEMATICA
Flatten[Differences/@Partition[Prime[Range[200]], 2]]-1 (* Harvey P. Dale, Dec 17 2023 *)
PROG
(PARI) a(n)=my(q=prime(2*n)); q-precprime(q-1)-1 \\ Charles R Greathouse IV, Apr 21 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Woodward, Apr 09 2015
STATUS
approved