This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A046929 #17 Dec 21 2021 23:47:26 %S A046929 0,0,1,1,1,1,1,1,3,1,1,3,1,1,3,5,1,1,3,1,1,3,3,5,3,1,1,1,1,3,3,3,1,1, %T A046929 1,1,5,3,3,5,1,1,1,1,1,1,11,3,1,1,3,1,1,5,5,5,1,1,3,1,1,9,3,1,1,3,5,5, %U A046929 1,1,3,5,5,5,3,3,5,3,3,7,1,1,1,1,3,3,5,3,1,1,3,7,3,3 %N A046929 Width of moat of composite numbers surrounding n-th prime. %H A046929 T. D. Noe, <a href="/A046929/b046929.txt">Table of n, a(n) for n = 1..10000</a> %H A046929 Jean-François Alcover, <a href="/A046929/a046929.txt">Frequency distribution up to 10^6 terms.</a> %e A046929 23 has a buffer of 3 composites around it on each side: 20,21,22,23,24,25,26. %p A046929 with(numtheory); a := i->min(ithprime(n)-ithprime(n-1)-1, ithprime(n+1)-ithprime(n)-1); %t A046929 a[n_] := Min[Prime[n] - Prime[n-1] - 1, Prime[n+1] - Prime[n] - 1]; a[1] = 0; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Apr 16 2013 *) %t A046929 Join[{0},Min[Differences[#]]&/@Partition[Prime[Range[100]],3,1]-1] (* _Harvey P. Dale_, Feb 24 2014 *) %Y A046929 Related sequences: A023186-A023188, A046929-A046931, A051650, A051652, A051697-A051702, A051728-A051730. %K A046929 nonn,easy,nice %O A046929 1,9 %A A046929 _N. J. A. Sloane_