A013633 nextprime(n) - prevprime(n).
3, 2, 4, 2, 6, 4, 4, 4, 6, 2, 6, 4, 4, 4, 6, 2, 6, 4, 4, 4, 10, 6, 6, 6, 6, 6, 8, 2, 8, 6, 6, 6, 6, 6, 10, 4, 4, 4, 6, 2, 6, 4, 4, 4, 10, 6, 6, 6, 6, 6, 12, 6, 6, 6, 6, 6, 8, 2, 8, 6, 6, 6, 6, 6, 10, 4, 4, 4, 6, 2, 8, 6, 6, 6, 6, 6, 10, 4, 4
Offset: 3
Keywords
Examples
a(3) = nextprime(3) - prevprime(3) = 5 - 2 = 3: This shows that here the variants 2 (A151800 and A151799) of the nextprime and precprime functions are used, rather than the variants A007918 and A007917. - _M. F. Hasler_, Sep 09 2015
Links
- T. D. Noe, Table of n, a(n) for n=3..2000
Programs
-
Maple
[ seq(nextprime(i)-prevprime(i),i=3..100) ];
-
PARI
A013633(n)=nextprime(n+1)-precprime(n-1) \\ M. F. Hasler, Sep 09 2015