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 A167595 #12 Feb 18 2019 11:12:45 %S A167595 1,2,1,3,5,5,7,9,9,11,13,15,17,19,21,23,23,25,27,29,31,33,35,37,37,39, %T A167595 41,43,45,47,49,51,53,55,57,59,61,61,63,65,67,69,71,73,75,75,77,79,81, %U A167595 83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,119 %N A167595 The number of nonisolated primes between the n-th nonisolated nonprime and the n-th isolated nonprime. %e A167595 a(1)=1 (0 < 3 < 4); %e A167595 a(2)=2 (1 < 3,5 < 6); %e A167595 a(3)=1 (8 < 11 <12); %e A167595 a(4)=3 (9 < 11,13,17 < 18); %e A167595 a(5)=5 (10 < 11,13,17,19,29 < 30); %e A167595 a(6)=5 (14 < 17,19,29,31,41 < 42); %e A167595 a(7)=7 (15 < 17,19,29,31,41,43,59 < 60); %e A167595 a(8)=9 (16 < 17,19,29,31,41,43,59,61,71 < 72). %p A167595 A164276 := proc(n) option remember; if n = 1 then 0; else for a from procname(n-1)+1 do if isA164276(a) then return a; end if; end do; end if: end proc: %p A167595 A001097 := proc(n) option remember; if n =1 then 3; else for a from procname(n-1)+2 by 2 do if isA001097(a) then return a; end if; end do: end if; end proc: %p A167595 A167595 := proc(n) a := 0 ; for k from A164276(n)+1 to A014574(n)-1 do if isA001097(k) then a := a+1 ; end if; end do: a ; end proc: %p A167595 seq(A167595(n),n=1..120) ; # _R. J. Mathar_, May 30 2010 %Y A167595 Cf. A001097 (the nonisolated primes), A014574 (the isolated nonprimes), A164276 (the nonisolated nonprimes), A167511. %K A167595 nonn,easy %O A167595 1,2 %A A167595 _Juri-Stepan Gerasimov_, Nov 06 2009 %E A167595 More terms from _R. J. Mathar_, May 30 2010