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.

Previous Showing 31-40 of 57 results. Next

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

A083415 Triangle read by rows: T(n,k) is defined as follows. Write the numbers from 1 to n^2 consecutively in n rows of length n; T(n,k) = number of primes in k-th row.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, following a suggestion of Wouter Meeussen, Jun 10 2003

Keywords

Comments

Sum(T(n,k): 1<=k<=n) = A038107(n); T(n,1)=A000720(n); T(n,2)=A060715(n) for n>1. - Reinhard Zumkeller, Jan 07 2004

Examples

			{0}
{1, 1}
{2, 1, 1} from / 1 2 3 / 4 5 6 / 7 8 9 /
{2, 2, 1, 1}
{3, 1, 2, 2, 1}
{3, 2, 2, 2, 1, 1}
		

References

  • Paulo Ribenboim, "The Little Book Of Big Primes," Springer-Verlag, NY 1991, page 185.

Crossrefs

Programs

  • Haskell
    a083415 n k = a083415_row n !! (k-1)
    a083415_row n = f n a010051_list where
       f 0 _     = []
       f k chips = (sum chin) : f (k - 1) chips' where
         (chin,chips') = splitAt n chips
    a083415_tabl = map a083415_row [1..]
    -- Reinhard Zumkeller, Jun 10 2012
  • Mathematica
    Table[PrimePi[m n]-PrimePi[(m-1) n], {n, 17}, {m, n}]

A084141 a(n) is the index in sequence A084138 when the value of that sequence is one (1), i.e., there is exactly one case where there are exactly a(n) primes between m and 2m, exclusively, for m > 0.

Original entry on oeis.org

0, 22, 36, 47, 79, 98, 114, 134, 173, 178, 184, 210, 218, 221, 245, 254, 262, 284, 297, 305, 327, 333, 373, 387, 396, 426, 459, 466, 470, 484, 530, 544, 563, 567, 575, 587, 616, 650, 694, 700, 706, 708, 737, 776, 859, 881, 885, 898, 926, 939, 974, 993, 1002
Offset: 0

Views

Author

Harry J. Smith, May 15 2003

Keywords

Comments

This calculation relies on the fact that Pi(2*m) - Pi(m) > m/(3*log(m)) for m >= 5. Conjecture: There are an infinite number of terms in this sequence.

Examples

			a(3)=47 because the 3rd one in sequence A084138 is its item 47. There is exactly one case where there are exactly 47 primes between m and 2m.
		

References

  • P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, 1991, p. 140.

Crossrefs

A117490 Number of primes between n and n^2 (with n and n^2 excluded).

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 11, 14, 18, 21, 25, 29, 33, 38, 42, 48, 54, 59, 64, 70, 77, 84, 90, 96, 105, 113, 120, 128, 136, 144, 151, 161, 170, 180, 189, 199, 207, 216, 228, 239, 250, 261, 269, 281, 292, 305, 314, 327, 342, 352, 363, 378, 393, 405, 418, 429, 441, 458, 470
Offset: 1

Views

Author

Keywords

Comments

A famous Japanese mathematics book states that this sequence is nonzero (for n>1) if the Riemann Hypothesis is true, but this statement seems to be false.
If the n-th prime is denoted by p(n) then a(j) = number of nonzero values of floor (j^2/p(n)), over all n >= 1, (derived from A165974). - Christopher Hunt Gribble, Oct 03 2009

Examples

			For n = 5: between 5+1 = 6 and 5^2-1 = 24 there are the following six primes: 7, 11, 13, 17, 19, 23.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,j,np; for i from 1 by 1 to n do np:=0; for j from i+1 by 1 to i^2-1 do if isprime(j) then np:=np+1; fi; od; print(np); od; end: P(100);
  • Mathematica
    a[n_] := PrimePi[n^2 - 1] - PrimePi[n]; Array[a, 59] (* Robert G. Wilson v, Apr 06 2006 *)

Formula

a(n) = pi(n^2) - pi(n), cf. A000720.
a(n) = A038107(n) - A000720(n) = A073882(n) - A010051(n). - Reinhard Zumkeller, May 20 2010

A084142 Positive numbers k such that the number of primes between k and 2*k is different from the number of primes between m and 2*m for every number m != k.

Original entry on oeis.org

1, 120, 216, 300, 531, 714, 804, 999, 1344, 1356, 1395, 1680, 1764, 1770, 1959, 2046, 2121, 2325, 2484, 2511, 2760, 2826, 3150, 3285, 3396, 3744, 4044, 4116, 4146, 4314, 4710, 4839, 5046, 5070, 5136, 5250, 5586, 5970, 6411, 6459, 6501, 6504, 6846, 7275
Offset: 1

Views

Author

Harry J. Smith, May 15 2003

Keywords

Comments

The number of primes between k and 2*k is unique because no other number m > 0 has the same of primes between m and 2m, exclusively. k is the value of A060756(j) or A084139(j) when A084138(j) = 1. Question: Is this sequence infinitely long?
If k > 1 is a term then A060715(k-1) < A060715(k) < A060715(k+1). Consequently, (2*k-1, 2*k+1) is a twin prime pair, so 3|k. Additionally, it can be shown that k-1..k+3 are all composite numbers. Moreover, if k is even, then k-4..k+4 are all composite numbers. - Jon E. Schoenfield, Oct 08 2023

Examples

			120 is a term because there are 22 primes between 120 and 240 and no other number m > 0 has 22 primes between m and 2*m.
		

References

  • P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, 1991, p. 140.

Crossrefs

Extensions

Name edited by Jon E. Schoenfield, Oct 08 2023

A114021 Number of semiprimes between n and n + sqrt(n).

Original entry on oeis.org

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

Views

Author

Jonathan Vos Post, Jan 31 2006

Keywords

Comments

It appears that for n > 37 it is always true that a(n) > 0. The exponent can be reduced further. Since 597 + 597^(0.4129) > 611, leaping the record semiprime gap between 597 and 611, it seems that for n > 597 it is always true that there is a semiprime between n and n^(0.4129). It seems that for n > 2705 it is always true that there is a semiprime between n and n^(0.3509). These conjectures are related to the various sequences about semiprime gaps and the merit of such gaps.
a(96) appears to be the last zero term. - T. D. Noe, Aug 12 2008

Examples

			a(0) = 0 because there are no semiprimes between 0 and 0+sqrt(0) = 0.
a(2) = 0 because there are no semiprimes between 2 and 2+sqrt(2) = 3.414...
a(3) = 1 as the semiprime 4 falls between 3 and 3 + sqrt(3) = 4.732...
a(5) = 1 as the semiprime 6 falls between 5 and 5 + sqrt(5) = 7.236...
		

Crossrefs

Programs

  • Mathematica
    SemiPrimeQ[n_] := TrueQ[Plus@@Last/@FactorInteger[n]==2]; Table[hi=n+Sqrt[n]; If[IntegerQ[hi], hi--, hi=Floor[hi]]; Length[Select[Range[n+1,hi], SemiPrimeQ]], {n,0,150}] (* T. D. Noe, Aug 12 2008 *)
  • Perl
    use ntheory ":all"; print "$ ",semiprime_count($+1, $+sqrtint($)-($ && is_square($))),"\n" for 0..1000; # Dana Jacobsen, Mar 04 2019

Formula

a(n) = card{S such that S is an element of A001358 and n < S < n + n^(1/2)}.

Extensions

Corrected and extended by T. D. Noe, Aug 12 2008

A134034 Number of primes between n^K and (n+1)^K, where K is 1.647862393566467... and n is an integer greater than 0.

Original entry on oeis.org

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

Views

Author

Dmitry Kamenetsky, Jan 11 2008

Keywords

Comments

K is the smallest number such that there is always at least one prime between n^K and (n+1)^K for any integer n>0.
This is not the smallest K. See A143898. [T. D. Noe, Sep 04 2008]

Crossrefs

Programs

  • Mathematica
    k=1.647862393566467; Table[Length[Select[Range[Ceiling[n^k],Floor[(n+1)^k]], PrimeQ]], {n,150}] (* T. D. Noe, Sep 04 2008 *)

Extensions

Corrected by T. D. Noe, Sep 04 2008

A079614 Decimal expansion of Bertrand's constant.

Original entry on oeis.org

1, 2, 5, 1, 6, 4, 7, 5, 9, 7, 7, 9, 0, 4, 6, 3, 0, 1, 7, 5, 9, 4, 4, 3, 2, 0, 5, 3, 6, 2, 3, 3, 4, 6, 9, 6, 9
Offset: 1

Views

Author

Benoit Cloitre, Jan 29 2003

Keywords

Comments

From Bertrand's postulate (i.e., there is always a prime p in the range n < p < 2n) one can show there is a constant b such that floor(2^b), floor(2^2^b), ..., floor(2^2^2...^b), ... are all primes.
This result is due to Wright (1951), so Bertrand's constant might be better called Wright's constant, by analogy with Mills's constant A051021. - Jonathan Sondow, Aug 02 2013

Examples

			2^(2^(2^1.251647597790463017594432053623)) is approximately 37.0000000000944728917062132870071 and A051501(3)=37.
		

References

  • S. Finch, Mathematical Constants, Cambridge Univ. Press, 2003; see section 2.13 Mills's constant.

Crossrefs

Formula

1.251647597790463017594432053623346969...

Extensions

More digits (from the Prime Curios page) added by Frank Ellermann, Sep 19 2011
a(16)-a(37) from Charles R Greathouse IV, Sep 20 2011
Definition clarified by Jonathan Sondow, Aug 02 2013

A117491 The number of primes between n and n^3 (with n and n^3 excluded).

Original entry on oeis.org

0, 3, 7, 16, 27, 44, 64, 93, 125, 164, 212, 264, 321, 394, 470, 558, 649, 758, 874, 999, 1139, 1290, 1448, 1624, 1812, 2011, 2218, 2451, 2697, 2951, 3217, 3501, 3806, 4126, 4472, 4810, 5182, 5567, 5983, 6401, 6837, 7295, 7775, 8279, 8796, 9347, 9901, 10484
Offset: 1

Views

Author

Keywords

Examples

			For n = 3: between 3+1 = 4 and 3^3-1 = 26 there are the following primes: 5, 7, 11, 13, 17, 19, 23. Therefore the number of primes is 7.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,j,np; for i from 1 by 1 to n do np:=0; for j from i+1 by 1 to i^3-1 do if isprime(j) then np:=np+1; fi; od; print(np); od; end: P(100);
  • Mathematica
    Table[PrimePi[n^3]-PrimePi[n],{n,50}] (* Harvey P. Dale, Nov 08 2012 *)

A166968 Minimum k such that for all m >= k there is a prime p with m < p < m * (n+1)/n.

Original entry on oeis.org

2, 8, 9, 24, 25, 32, 33, 48, 115, 116, 117, 118, 118, 140, 140, 141, 200, 212, 212, 213, 294, 294, 318, 318, 319, 319, 320, 320, 320, 524, 525, 525, 526, 526, 526, 527, 527, 528, 528, 1328, 1329, 1330, 1331, 1331, 1332, 1333, 1333, 1334, 1334, 1335, 1335
Offset: 1

Views

Author

Michael B. Porter, Oct 25 2009

Keywords

Comments

The first term was proved by Chebyshev in 1850: for all m > 1, there is a prime number between m and 2m. It is known by Bertrand's Postulate after Joseph Bertrand, who first conjectured it in 1845, and also by Chebyshev's Theorem.
The result a(5)=25 was proved by Jitsuro Nagura in 1952.
The result a(16597)=2010760 was proved by Pierre Dusart in 1998.

Examples

			For n=4, there are no primes between 23 and 23*5/4 = 28.75. But, for all m >= 24, there is a prime p such that m < p < 5m/4, so a(4) = 24.
		

Crossrefs

Programs

  • PARI
    /* This function searches until it finds 10 primes between x and x*(n+1)/n */
    pi_excl(y) = if(y==floor(y),primepi(y)-isprime(y),primepi(y)) /* all primes < y, primepi(y) is all primes <= y */
    pbetween(x,y) = pi_excl(y) - primepi(x)
    A166968(n) = {local(pr,x,r);pr=0;x=1;r=0;while(pr<10,pr=pbetween(x,x*(n+1)/n);if(pr==0,r=x+1);x=x+1);r}
    
  • Sage
    def a_list() :
        known_n, known_k = (16597, 2010760)
        L = [0] * known_n
        L[known_n-1] = known_k
        for n in range(known_n-1,0,-1) :
            L[n-1] = 1 + next(k for k in range(L[n]-1,0,-1) if next_prime(k) >= k*(n+1)/n)
        return L
    # Eric M. Schmidt, Oct 21 2017

Extensions

Edited by Eric M. Schmidt, Oct 21 2017
Previous Showing 31-40 of 57 results. Next