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.

A188817 Number of primes between n-sqrt(n) and n+sqrt(n), inclusive.

Original entry on oeis.org

1, 2, 2, 3, 3, 2, 2, 1, 2, 3, 2, 2, 2, 3, 2, 3, 3, 2, 3, 3, 3, 2, 2, 1, 2, 3, 3, 3, 2, 2, 2, 3, 3, 3, 2, 3, 4, 3, 3, 3, 4, 4, 4, 3, 3, 3, 4, 3, 3, 3, 2, 3, 3, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 4, 5, 5, 5, 4, 4, 3, 4, 4, 4, 4, 5, 4, 4, 4, 4, 3, 4, 4, 3, 3, 3, 3, 3, 4, 3, 3, 3, 4, 3, 4, 4, 4, 4, 5, 4, 5, 5, 5, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 3, 3, 3, 4, 3, 3, 2
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 11 2011

Keywords

Comments

It appears that all terms are positive.

Examples

			a(1)=1 because prime 2 is in [0,2].
a(2)=2 because primes 2 and 3 are between 2-sqrt(2) and 2+sqrt(2).
a(3)=2 because primes 2 and 3 are between 3-sqrt(3) and 3+sqrt(3).
a(4)=3 because primes 2, 3, and 5 are in [2,6].
		

Crossrefs

Programs

  • Maple
    A188817 := proc(n) local low,hi; low := n-sqrt(n) ; if not issqr(n) then low := ceil(low) ; end if; hi := n+sqrt(n) ; if not issqr(n) then hi := floor(hi) ; end if; numtheory[pi](hi)-numtheory[pi](low-1) ; end proc:
    seq(A188817(n),n=1..50) ; # R. J. Mathar, Apr 12 2011
  • Mathematica
    Join[{1, 2, 2, 3}, Table[PrimePi[n + Sqrt[n]] - PrimePi[n - Sqrt[n]], {n, 5, 120}]] (* T. D. Noe, Apr 11 2011 *)

Extensions

Corrected by T. D. Noe, Apr 11 2011

A114057 Start of record gap in odd semiprimes A046315.

Original entry on oeis.org

9, 25, 39, 95, 267, 2369, 6559, 8817, 13705, 15261, 21583, 35981, 66921, 113009, 340891, 783757, 872219, 3058853, 3586843, 5835191, 12345473, 108994623, 248706917, 268749691, 679956119, 709239621, 3648864859, 3790337723, 4171420481, 33955869693, 34279038379
Offset: 1

Views

Author

Jonathan Vos Post, Feb 02 2006

Keywords

Comments

3 of the first 5 values of record gaps in odd semiprimes are also record merits = (A046315(k+1)-A046315(k))/log_10(A046315(k)), namely: (15 - 9) / log_10(9) = 6.28770982; (111 - 95) / log_10(95) = 8.09010923; (287 - 267) / log_10(267) = 8.24228608. It is easy to prove that there are gaps of arbitrary length in even semiprimes (A100484); can we prove that there are gaps of arbitrary length in odd semiprimes (A046315) and in semiprimes (A001358)?
The record gaps have lengths 6, 8, 10, 16, 20, 22, 24, 26, 28, 32, 36, 38, 40, 44, 50, 52, 60, 64, 70, 74. - T. D. Noe, Feb 03 2006

Examples

			a(1) = A046315(2)-A046315(1) = 15 - 9 = 6.
a(2) = A046315(5)-A046315(4) = 33 - 25 = 8.
a(3) = A046315(8)-A046315(7) = 49 - 39 = 10.
a(4) = A046315(20)-A046315(19) = 111 - 95 = 16.
a(5) = A046315(55)-A046315(54) = 287 - 267 = 20.
		

Crossrefs

Starting at a(4)=95 the known terms of this sequence coincide with A350098.

Programs

  • Mathematica
    f[n_] := Block[{k = n + 2}, While[ Plus @@ Last /@ FactorInteger@k != 2, k += 2]; k]; lst = {}; d = 0; a = b = 9; Do[{a, b} = {b, f[a]}; If[b - a > d, d = b - a; AppendTo[lst, a]], {n, 10^8}]; lst (* Robert G. Wilson v, Feb 03 2006 *)

Formula

{a(n)} = {A046315(k) such that A046315(k+1)-A046315(k) is a record}.

Extensions

More terms from Robert G. Wilson v and T. D. Noe, Feb 03 2006
a(23)-a(28) from Donovan Johnson, Mar 14 2010
a(29)-a(31) from Donovan Johnson, Oct 20 2012

A114058 Start of record gap in even semiprimes (A100484).

Original entry on oeis.org

4, 6, 14, 46, 178, 226, 1046, 1774, 2258, 2654, 19102, 31366, 39218, 62794, 311842, 721306, 740522, 984226, 2699066, 2714402, 4021466, 9304706, 34103414, 41662646, 94653386, 244329494, 379391318, 383825566, 774192266
Offset: 1

Views

Author

Jonathan Vos Post, Feb 02 2006

Keywords

Comments

5 of the first 6 values of record gaps in even semiprimes are also record merits = (A100484(k+1)-A100484(k))/log_10(A100484(k)), namely: (6 - 4) / log_10(4) = 3.32192809; (10 - 6) / log_10(6) = 5.14038884; (22 - 14) / log_10(14) = 6.98002296; (58 - 46) / log_10(46) = 7.21692586; (254 - 226) / log_10(226) = 11.8940995. It is easy to prove that there are gaps of arbitrary length in even semiprimes (A100484), as 2*(n!+2), 2*(n!+3), 2*(n!+4), ..., 2*(n!+n) gives (n-1) consecutive even nonsemiprimes. Can we prove that there are gaps of arbitrary length in odd semiprimes (A046315) and in semiprimes (A001358)?
For every n, a(n) = 2*A002386(n). - John W. Nicholson, Jul 26 2012

Examples

			gap[a(1)] = A100484(2)-A100484(1) = 6 - 4 = 2.
gap[a(2)] = A100484(3)-A100484(2) = 10 - 6 = 4.
gap[a(3)] = A100484(5)-A100484(4) = 22 - 14 = 8.
gap[a(4)] = A100484(10)-A100484(9) = 58 - 46 = 12.
gap[a(5)] = A100484(25)-A100484(24) = 194 - 178 = 16.
gap[a(6)] = A100484(31)-A100484(30) = 254 - 226 = 28.
		

Crossrefs

Cf. A001358, A046315, A065516, A085809, A100484, A114412, A114021. Maximal gap small prime A002386.

Programs

  • Mathematica
    f[n_] := Block[{k = n + 2}, While[ Plus @@ Last /@ FactorInteger@k != 2, k += 2]; k]; lst = {}; d = 0; a = b = 4; Do[{a, b} = {b, f[a]}; If[b - a > d, d = b - a; AppendTo[lst, a]], {n, 10^8}]; lst (* Robert G. Wilson v *)

Formula

a(n) = A100484(k) such that A100484(k+1)-A100484(k) is a record.

Extensions

a(7)-a(25) from Robert G. Wilson v, Feb 03 2006
a(26)-a(31) from Donovan Johnson, Mar 14 2010
Showing 1-3 of 3 results.