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 A161865 #16 Apr 27 2019 02:33:33 %S A161865 1,3,5,2,1,3,12,13,1,16,19,10,22,1,25,13,30,31,33,17,18,38,41,40,43, %T A161865 46,47,16,51,1,53,56,19,60,61,32,66,65,68,23,18,76,25,1,78,83,1,82,89, %U A161865 45,88,89,95,24,100,101,49,104,103,21,55,27,112,1,115,59,1,20,21,15,64,1 %N A161865 Numerators of ratio of nonprimes in a square interval to that of nonprimes in that interval and its successor. %H A161865 G. C. Greubel, <a href="/A161865/b161865.txt">Table of n, a(n) for n = 1..1000</a> %F A161865 The limit of this sequence is 1/2, as can be shown by setting an increasing lower bound on the ratio of composites in successive square intervals. %e A161865 First few terms are 1/4, 3/8, 5/11, 2/5, 1/2, 3/7, 12/25, 13/29. %e A161865 For n=1: there is 1 nonprime <= 1, 2 nonprimes <= 4, and 5 nonprimes <= 9. The ratio is (2 - 1)/(5 - 1) = 1/4. %p A161865 A062298 := proc(n) n-numtheory[pi](n) ; end: A078435 := proc(n) A062298(n^2) ; end: A161865 := proc(n) r := [ A078435(n),A078435(n+1),A078435(n+2)] ; (r[2]-r[1])/(r[3]-r[1]) ; numer(%) ; end: seq(A161865(n),n=1..120) ; # _R. J. Mathar_, Sep 27 2009 %t A161865 Numerator[Table[((2 n + 1) - (PrimePi[(n + 1)^2] - PrimePi[n^2]))/((4 n + 4) - (PrimePi[(n + 2)^2] - PrimePi[n^2])), {n, 1, 40}]] (* corrected by _G. C. Greubel_, Dec 20 2016 *) %Y A161865 Cf. A161621, A161622, A161867 (denominators for this sequence). %K A161865 nonn,frac %O A161865 1,2 %A A161865 _Daniel Tisdale_, Jun 20 2009 %E A161865 Extended beyond a(8) by _R. J. Mathar_, Sep 27 2009