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-6 of 6 results.

A161622 Denominators of the ratios (in lowest terms) of numbers of primes in one square interval to that of the interval and its successor.

Original entry on oeis.org

2, 2, 5, 5, 3, 7, 7, 7, 8, 9, 9, 2, 9, 5, 13, 12, 11, 2, 13, 2, 2, 13, 5, 17, 15, 15, 17, 17, 2, 9, 19, 19, 19, 19, 19, 2, 7, 23, 23, 23, 20, 7, 23, 24, 23, 23, 28, 5, 21, 26, 31, 7, 25, 24, 23, 29, 30, 29, 2, 29, 30, 32, 29, 15, 31, 2, 32, 30, 34, 12, 2, 32, 2, 35, 20, 18, 16, 41, 36, 33
Offset: 1

Views

Author

Daniel Tisdale, Jun 14 2009

Keywords

Comments

The numerators are derived from sequence A014085.
The expression is: R(n) = (PrimePi((n+1)^2) - PrimePi(n^2))/(PrimePi((n+2)^2) - PrimePi(n^2)).
The first few ratios are 1/2, 2/5, 3/5, 1/3, 4/7, ...
Conjecture: lim_{n->infinity} R(n) = 1/2. See also more extensive comment entered with sequence of numerators. This conjecture implies Legendre's conjecture.

Examples

			R(3) = (PrimePi(4^2)-PrimePi(3^2)) / (PrimePi(5^2)-PrimePi(3^2)) = (PrimePi(16)-PrimePi(9)) / (PrimePi(25)-PrimePi(9)) = (6-4)/(9-4) = 2/5. Hence a(3) = 5. - _Klaus Brockhaus_, Jun 15 2009
		

Crossrefs

Cf. A014085.
Cf. A161621 (numerators). - Klaus Brockhaus, Jun 15 2009

Programs

  • Magma
    [ Denominator((#PrimesUpTo((n+1)^2) - a) / (#PrimesUpTo((n+2)^2) - a)) where a is #PrimesUpTo(n^2): n in [1..80] ]; // Klaus Brockhaus, Jun 15 2009

Extensions

a(1) inserted and extended beyond a(11) by Klaus Brockhaus, Jun 15 2009

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

A161892 Numerators of S(n) = Sum_{j=2..n} (pi((j+1)^2) - pi(j^2))/(pi((j+1)^2)*pi(j^2)) where pi(k) = A000720(k).

Original entry on oeis.org

1, 1, 7, 9, 13, 4, 5, 23, 7, 8, 37, 21, 23, 13, 59, 16, 35, 19, 83, 45, 97, 103, 28, 30, 127, 135, 36, 38, 40, 85, 179, 189, 99, 52, 217, 113, 119, 249, 261, 68, 281, 293, 76, 317, 327, 85, 355, 365, 94, 391, 407, 419, 108, 443, 455, 118, 485, 501, 517, 265, 547, 281, 144, 148
Offset: 2

Views

Author

Daniel Tisdale, Jun 21 2009

Keywords

Comments

The sum converges rapidly to 1/2. For 100 summands, S(n) = 0.4992...; for 500, S(n) = 0.49995...

Examples

			First few fractions are 1/4, 1/3, 7/18, 9/22, 13/30, 4/9, 5/11, 23/50, 7/15, ...
		

Crossrefs

Cf. A000720 (pi), A161893 (denominators).
Cf. A161621.

Programs

  • Mathematica
    Table[Sum[(PrimePi[(i+1)^2]-PrimePi[i^2])/(PrimePi[(i+1)^2]*PrimePi[i^2]),{i,2,j}],{j,2,50}]
  • PARI
    a(n) = numerator(sum(k=2, n, (primepi((k+1)^2) - primepi(k^2))/(primepi((k+1)^2)*primepi(k^2)))); \\ Michel Marcus, Aug 15 2022

Extensions

Offset 2 and more terms from Michel Marcus, Aug 15 2022

A161893 Denominators of S(n) = Sum_{j=2..n} (pi((j+1)^2) - pi(j^2))/(pi((j+1)^2)*pi(j^2)) where pi(k) = A000720(k).

Original entry on oeis.org

4, 3, 18, 22, 30, 9, 11, 50, 15, 17, 78, 44, 48, 27, 122, 33, 72, 39, 170, 92, 198, 210, 57, 61, 258, 274, 73, 77, 81, 172, 362, 382, 200, 105, 438, 228, 240, 502, 526, 137, 566, 590, 153, 638, 658, 171, 714, 734, 189, 786, 818, 842, 217, 890, 914, 237, 974, 1006, 1038, 532, 1098, 564, 289, 297
Offset: 2

Views

Author

Daniel Tisdale, Jun 21 2009

Keywords

Comments

The sum converges rapidly to 1/2; S(100) = 0.4992..., S(500) = 0.49995....

Examples

			First few fractions are 1/4, 1/3, 7/18, 9/22, 13/30, 4/9, 5/11, 23/50, 7/15, ...
		

Crossrefs

Cf. A000720 (pi), A161892 (numerators).
Cf. A161621.

Programs

  • PARI
    a(n) = denominator(sum(k=2, n, (primepi((k+1)^2) - primepi(k^2))/(primepi((k+1)^2)*primepi(k^2)))); \\ Michel Marcus, Aug 15 2022

Extensions

Offset 2 and more terms from Michel Marcus, Aug 15 2022

A163384 Values of n for which the ratio A161865/A161867 is greater than 1/2.

Original entry on oeis.org

23, 37, 42, 46, 50, 56, 58, 61, 69, 75, 77, 78, 80, 85, 92, 105, 107, 110, 116, 119, 122, 129, 133, 137, 138, 140, 143, 145, 147, 149, 152, 153, 157, 159, 162, 165, 168, 172, 174, 175, 178, 180, 182, 184, 188, 190, 192, 195, 201, 203, 205, 210, 216, 219, 222, 225, 228, 229, 232
Offset: 1

Views

Author

Daniel Tisdale, Jul 25 2009

Keywords

Comments

The corresponding values of A161621/A161622 are less than 1/2. For given n, both sequences would not be simultaneously greater than 1/2, although both could be less than 1/2.

Programs

  • Mathematica
    Select[Range[100], ((2 # + 1) - (PrimePi[(# + 1)^2] - PrimePi[#^2]))/((4 # + 4) - (PrimePi[(# + 2)^2] - PrimePi[#^2])) > 1/2 &] (* G. C. Greubel, Dec 20 2016 *)

Extensions

Added missing term 58 and terms a(14) onward by G. C. Greubel, Dec 20 2016

A163161 Values of n at which the sequence A161865/A161867 equals 1/2.

Original entry on oeis.org

5, 9, 14, 30, 44, 47, 64, 67, 72, 89, 99, 124, 125, 194, 198, 200, 208, 213, 214, 249, 267, 270, 320, 333, 372, 373, 374, 393, 455, 460, 475, 519, 586, 603, 643, 701, 704, 712, 770, 774, 789, 814, 825, 828, 836, 891, 906, 930, 941, 970, 974, 982, 983, 988, 1022
Offset: 1

Views

Author

Daniel Tisdale, Jul 21 2009, Jul 24 2009

Keywords

Comments

The corresponding sequence for primes is A144264, and the ratio is given by sequences A161621/A161622.

Programs

  • Mathematica
    t1 = Table[ ((2n+1) - (PrimePi[(n+1)^2] - PrimePi[n^2]))/((4n+4)- (PrimePi[(n+2)^2] - PrimePi[n^2])), {n,1,300}]; t2= Position[t1, 1/2] (* Daniel Tisdale, Jul 24 2009 *)

Extensions

Corrected by the author, Jul 25 2009
Extended beyond 194 by R. J. Mathar, Sep 27 2009
Showing 1-6 of 6 results.