OFFSET
0,1
LINKS
David A. Corneth, Table of n, a(n) for n = 0..775 (using b-file from A002386)
Eric Weisstein's World of Mathematics, Prime Distance
PROG
(PARI) d(n) = if(n<1, 2*(n==0), min(nextprime(n)-n, n-precprime(n))); \\ A051699
a(n) = my(k=0); while (d(k) != n, k++); k; \\ Michel Marcus, Aug 21 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Oct 17 2002
EXTENSIONS
More terms from Michel Marcus, Aug 21 2019
STATUS
approved