cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A161865 Numerators of ratio of nonprimes in a square interval to that of nonprimes in that interval and its successor.

Original entry on oeis.org

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, 46, 47, 16, 51, 1, 53, 56, 19, 60, 61, 32, 66, 65, 68, 23, 18, 76, 25, 1, 78, 83, 1, 82, 89, 45, 88, 89, 95, 24, 100, 101, 49, 104, 103, 21, 55, 27, 112, 1, 115, 59, 1, 20, 21, 15, 64, 1
Offset: 1

Views

Author

Daniel Tisdale, Jun 20 2009

Keywords

Examples

			First few terms are 1/4, 3/8, 5/11, 2/5, 1/2, 3/7, 12/25, 13/29.
For n=1: there is 1 nonprime <= 1, 2 nonprimes <= 4, and 5 nonprimes <= 9. The ratio is (2 - 1)/(5 - 1) = 1/4.
		

Crossrefs

Cf. A161621, A161622, A161867 (denominators for this sequence).

Programs

  • Maple
    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
  • Mathematica
    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 *)

Formula

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.

Extensions

Extended beyond a(8) by R. J. Mathar, Sep 27 2009

A161182 Successive differences between positions of squares in list of nonprimes.

Original entry on oeis.org

1, 1, 3, 5, 6, 9, 9, 12, 13, 16, 16, 19, 20, 22, 25, 25, 26, 30, 31, 33, 34, 36, 38, 41, 40, 43, 46, 47, 48, 51, 53, 53, 56, 57, 60, 61, 64, 66, 65, 68, 69, 72, 76, 75, 78, 78, 83, 82, 82, 89, 90, 88, 89, 95, 96, 100, 101, 98, 104, 103, 105, 110, 108, 112, 115, 115, 118, 120
Offset: 1

Views

Author

Daniel Tisdale, Jun 05 2009

Keywords

Crossrefs

Cf. A078435, sequence of positions of squares in sequence of nonprimes.

Programs

Formula

a(n) = A078435(n) - A078435(n-1). - R. J. Mathar, Jun 22 2009

Extensions

Corrected and extended by R. J. Mathar, Jun 22 2009

A161183 Terms which occur at least twice in A161182.

Original entry on oeis.org

1, 9, 16, 25, 53, 78, 82, 89, 115, 120, 130, 152, 161, 178, 196, 224, 233, 235, 250, 256, 265, 286, 291, 300, 301, 314, 315, 325, 347, 357, 360, 368, 381, 391, 397, 419, 428, 430, 456, 468, 479, 483, 484, 494, 495, 512, 528, 570, 577, 589, 591, 608, 610, 620
Offset: 1

Views

Author

Daniel Tisdale, Jun 05 2009

Keywords

Comments

A161182 is not monotonic, so some terms (like 89) listed here are not direct neighbors in A161182. - R. J. Mathar, Jun 22 2009

Crossrefs

Programs

  • Maple
    A038107 := proc(n) numtheory[pi]( n^2) ; end: A078435 := proc(n) n^2-A038107(n) ; end: A161182 := proc(n) A078435(n)-A078435(n-1) ; end: L := [] ; for n from 1 to 1200 do L := [op(L), A161182(n)] ; od: read("transforms3") ; L := sort(L) ; L := LISTDUPL(L,0) ; # R. J. Mathar, Jun 22 2009
  • Mathematica
    f[n_] := 2n - 1 - PrimePi[n^2] + PrimePi[(n-1)^2];
    Select[Split[Array[f, 1000]//Sort], Length[#] >= 2&][[All, 1]]
    (* Jean-François Alcover, Mar 07 2023 *)

Extensions

Edited by N. J. A. Sloane, Jun 07 2009
Missing numbers added by R. J. Mathar, Jun 22 2009
Showing 1-3 of 3 results.