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 41-50 of 114 results. Next

A349999 Least number m of primes that must have appeared in an interval [j^2, (j+1)^2], such that all intervals [k^2, (k+1)^2], k>j contain more than m primes. The corresponding values of j are A349998.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 18, 19, 22, 24, 26, 27, 28, 29, 30, 32, 33, 35, 36, 38, 39, 40, 41, 44, 45, 47, 51, 54, 56, 63, 65, 68, 70, 71, 78, 80, 85, 94, 99, 106, 107, 114, 115, 120, 121, 127, 133, 138, 146, 154, 155, 164, 168, 169, 175, 176, 177
Offset: 1

Views

Author

Hugo Pfoertner, Dec 09 2021

Keywords

Comments

All terms are empirical (see the graph of A014085 for the limited width of the scatter band), but supporting the validity of Legendre's conjecture that there is always a prime between n^2 and (n+1)^2.
The terms are determined by searching from large to small indices in A014085 for new minima.

Examples

			See A349997 and A349998.
		

Crossrefs

Formula

a(n) = A014085(A349998(n)).
A014085(k) > a(n) for k > A349998(n).
A014085(k) >= a(n) for k >= A349997(n).

A038098 Number of primes < n^3.

Original entry on oeis.org

0, 4, 9, 18, 30, 47, 68, 97, 129, 168, 217, 269, 327, 400, 476, 564, 656, 765, 882, 1007, 1147, 1298, 1457, 1633, 1821, 2020, 2227, 2460, 2707, 2961, 3228, 3512, 3817, 4137, 4483, 4821, 5194, 5579, 5995, 6413, 6850, 7308, 7789, 8293
Offset: 1

Views

Author

Joe K. Crump (joecr(AT)carolina.rr.com)

Keywords

Comments

From Zhi-Wei Sun, Oct 17 2015: (Start)
Conjecture: (i) For any integer k > 2 the sequence pi(n^k)/n^k (n = 2,3,...) is strictly decreasing, where pi(x) denotes the number of primes not exceeding x.
(ii) All the numbers pi(n^2)/n^2 (n = 1,2,3,...) are pairwise distinct. Moreover, we have pi(n^2)/n^2 > pi((n+1)^2)/(n+1)^2 for all n > 15646.
(End)

Examples

			a(2)=4 because the only primes < 8 are 2,3,5 and 7.
		

Crossrefs

Cf. A014085, A038107, A060199 (first differences).

Programs

  • PARI
    vector(100, n, primepi(n^3)) \\ Altug Alkan, Oct 17 2015
  • Sage
    [prime_pi(n^3) for n in range(1, 45)] # Zerinvary Lajos, Jun 06 2009
    

Formula

a(n) = A000720(A000578(n)). - Michel Marcus, Sep 02 2013

A084597 Largest k such that there are exactly n primes between k^2 and (k+1)^2.

Original entry on oeis.org

5, 9, 14, 17, 23, 26, 30, 42, 49, 55, 56, 80, 77, 72, 85, 84, 89, 119, 102, 118, 137, 136, 143, 140, 149, 156, 174, 178, 188, 184, 194, 200, 195, 207, 219, 198, 228, 247, 261, 263, 245, 249, 279, 297, 289, 327, 306, 310, 325, 335, 321, 290, 356, 344, 425, 365
Offset: 2

Views

Author

Harry J. Smith, May 31 2003

Keywords

Comments

a(n) is the index of last occurrence of n in A014085. This sequence relies on a heuristic calculation and there is no proof that it is correct. Conjecture: There is no k that has only one prime between k^2 and (k+1)^2.

Examples

			a(14)=77 because 14 is in sequence A014085 for the last time at item 77. There are 14 primes between 77^2 and 78^2.
		

References

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

Crossrefs

A108309 Consider the triangle of odd numbers where the n-th row has the next n odd numbers. The sequence is the number of primes in the n-th row.

Original entry on oeis.org

0, 2, 2, 3, 2, 3, 3, 4, 4, 5, 3, 4, 6, 4, 6, 6, 4, 6, 7, 6, 8, 7, 5, 8, 9, 8, 7, 8, 9, 8, 9, 10, 10, 8, 10, 12, 5, 12, 12, 13, 9, 11, 11, 9, 13, 14, 9, 14, 14, 10, 10, 19, 14, 12, 12, 12, 12, 16, 15, 16, 15, 13, 18, 16, 16, 12, 16, 17, 15, 16, 18, 14, 15, 20, 18, 19, 14, 19, 20, 18, 16
Offset: 1

Views

Author

Giovanni Teofilatto, Jul 25 2005

Keywords

Comments

Except for the initial term, a(n)>=2 because in the interval 2n-1 of odd numbers there are always at least two primes.
For n>2, this is the same as the number of primes between n^2-n and n^2+n, which is the sum of A089610 and A094189. - T. D. Noe, Sep 16 2008
a(n) = SUM(A010051(A176271(n,k)): 1<=k<=n). - Reinhard Zumkeller, Apr 13 2010
From Pierre CAMI, Sep 03 2014: (Start)
For n>1 a(n)~floor(1/2 + n/log(n)).
The number of primes < n^2 is ~ n^2/2/log(n) by the prime number theorem, as a(n) ~ floor(1/2 + n/log(n)) we have:
n^2/2/log(n) ~ 1 + floor(1/2 + 2/log(2)) + floor(1/2 + 3/log(3)) + floor(1/2 + 4/log(4)) + ... + floor(1/2 + (n-1)/log(n-1)) + floor(1/2 + n/log(n)).
For n=16000 the number of primes < n^2 is 13991985, the sum: 1 + floor(1/2 + 2/log(2)) + floor(1/2 + 3/log(3)) + floor(1/2 + 4/log(4))+ ... + floor(1/2 + (n-1)/log(n-1)) + floor(1/2 + n/log(n)) is 13991101 and (n^2)/(2*log(n)) is 13222671.
So between n^2+n and n^2+3*n there are n odd numbers and ~floor(1/2 + n/log(n)) prime numbers.
The twin primes are of the form T1=n^2+n-1 and T2=n^2+n+1, or n^2+n+T1 and n^2+n+T2 with T1<=2*n-1, or n^2+n+P and n^2+n+P(-2 or +2) with P prime <=2*n-1.
(End)

Examples

			Triangle begins:
1: 1 -> 0 primes,
2: 3,5 -> 2 primes,
3: 7,9,11 -> 2 primes,
4: 13,15,17,19 -> 3 primes.
		

Crossrefs

Programs

  • Haskell
    a108309 = sum . (map a010051) . a176271_row
    -- Reinhard Zumkeller, May 24 2012
  • Maple
    seq(numtheory:-pi(n^2+n-1)-numtheory:-pi(n^2-n),n=1..100); # Robert Israel, Sep 03 2014
  • Mathematica
    f[n_] := PrimePi[n^2 + n - 1] - PrimePi[n^2 - n]; Table[f[n], {n, 81}] (* Ray Chandler, Jul 26 2005 *)

Extensions

Edited and extended by Ray Chandler, Jul 26 2005

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

A144140 Numbers n such that between n^K and (n+1)^K there are no primes, where K = 3/2.

Original entry on oeis.org

10, 20, 24, 27, 32, 65, 121, 139, 141, 187, 306, 321, 348, 1006, 1051
Offset: 1

Views

Author

Artur Jasinski, Sep 11 2008

Keywords

Comments

Conjecture: this sequence is finite and complete

Crossrefs

Programs

  • Maple
    select(n -> numtheory:-pi(floor((n+1)^(3/2))) = numtheory:-pi(ceil(n^(3/2)-1)), [$1..10000]); # Robert Israel, Feb 02 2016
  • Mathematica
    a = {}; k = 3/2; Do[If[Length[Select[Range[Ceiling[n^k], Floor[(n + 1)^k]], PrimeQ]] == 0, Print[n]; AppendTo[a, n]], {n, 10000}]; a

A220492 Number of primes p between quarter-squares, Q(n) < p <= Q(n+1), where Q(n) = A002620(n).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 04 2013

Keywords

Comments

It appears that a(n) > 0, if n > 1.
Apparently the above comment is equivalent to the Oppermann's conjecture. - Omar E. Pol, Oct 26 2013
For n > 0, also the number of primes per quarter revolution of the Ulam Spiral. The conjecture implies that there is at least one prime in every turn after the first. - Ruud H.G. van Tol, Jan 30 2024

Examples

			When the nonnegative integers are written as an irregular triangle in which the right border gives the quarter-squares without repetitions, a(n) is the number of primes in the n-th row of triangle. See below (note that the prime numbers are in parenthesis):
---------------------------------------
Triangle                          a(n)
---------------------------------------
0;                                 0
1;                                 0
(2);                               1
(3),   4;                          1
(5),   6;                          1
(7),   8,   9;                     1
10,  (11), 12;                     1
(13), 14,  15,   16;               1
(17), 18, (19),  20;               2
21,   22, (23),  24,  25;          1
26,   27,  28,  (29), 30;          1
...
		

Crossrefs

Programs

A285786 Number of primes p with 2(n-1)^2 < p <= 2n^2.

Original entry on oeis.org

1, 3, 3, 4, 4, 5, 5, 6, 6, 9, 7, 8, 7, 9, 10, 10, 9, 12, 10, 11, 13, 11, 14, 13, 14, 13, 14, 16, 16, 15, 15, 16, 17, 18, 19, 14, 22, 19, 18, 16, 22, 18, 24, 20, 22, 22, 20, 23, 24, 22, 23, 21, 25, 27, 24, 27, 26, 25, 27, 25, 23, 33, 28, 25, 29, 28, 31, 30, 33, 29
Offset: 1

Views

Author

Ralf Steiner, Apr 26 2017

Keywords

Comments

The author of the sequence conjectures that a(n) >= 1 for all n. This conjecture is similar to the famous conjecture made by Adrien-Marie Legendre that there is always a prime between n^2 and (n+1)^2, see A014085. - Antti Karttunen, May 01 2017

Examples

			For n = 1, the primes from 2*((1-1)^2) to 2*(1^2) (in semiopen range ]0, 2]) are: 2, thus a(1) = 1.
For n = 2, the primes from 2*((2-1)^2) to 2*(2^2) (in semiopen range ]2, 8]) are: 3, 5 and 7, thus a(2) = 3.
For n = 3, the primes from 2*((3-1)^2) to 2*(3^2) (in semiopen range ]8, 18]) are: 11, 13 and 17, thus a(3) = 3.
For n = 4, the primes from 2*((4-1)^2) to 2*(4^2) (in semiopen range ]18, 32]) are: 19, 23, 29 and 31, thus a(4) = 4.
		

Crossrefs

Cf. A001105, A000720 (number of primes), A014085 (between n^2 and (n+1)^2), A285738, A285388.

Programs

  • Maple
    R:= [0, seq(numtheory:-pi(2*n^2),n=1..100)]:
    R[2..-1] - R[1..-2]; # Robert Israel, May 01 2017
  • Mathematica
    Table[Length[Select[FactorInteger[Numerator[Table[2^(1 - 2 n^2) n Binomial[2 n^2, n^2], {n, 1, k}]]][[k]][[All, 1]], # > 2 (k - 1)^2 &]], {k, 1, 60}]
    Flatten[{1,2,Table[PrimePi[2 k^2] - PrimePi[2 (k - 1)^2], {k, 3, 60}]}]
    (* Second program: *)
    Array[PrimePi[2 #^2] - PrimePi[2 (# - 1)^2] &, 60] (* Michael De Vlieger, Apr 26 2017, at the suggestion of Robert G. Wilson v. *)
  • PARI
    a(n) = (primepi(2*n^2)-primepi(2*(n-1)^2)) \\ David A. Corneth, Apr 27 2017, edited by Antti Karttunen, May 01 2017
    
  • PARI
    a(n)=my(s); forprime(p=2*n^2 - 4*n + 3, 2*n^2, s++); s \\ Charles R Greathouse IV, May 10 2017
    
  • Python
    from sympy import primepi
    def a(n): return primepi(2*n**2) - primepi(2*(n - 1)**2) # Indranil Ghosh, May 01 2017

Formula

From Antti Karttunen, May 01 2017: (Start)
a(1) = 1, for n > 1, a(n) = A000720(A001105(n)) - A000720(A001105(n-1)).
For all n except n=2, a(n) <= n.
(End)
First differences of A278114: a(n) = A278114(n) - A278114(n-1) for n > 0, if we use A278114(0) = 0. A278114(n) = Sum_{k=1..n} a(n). - M. F. Hasler, May 02 2017

Extensions

Definition and value of a(2) changed by Antti Karttunen, May 01 2017

A349997 Numbers k such that the number of primes in any interval [j^2,(j+1)^2], j>k, is not less than the number of primes in the interval [k^2,(k+1)^2].

Original entry on oeis.org

1, 7, 11, 17, 18, 26, 27, 32, 46, 50, 56, 58, 85, 88, 92, 137, 143, 145, 152, 157, 178, 188, 194, 200, 201, 208, 225, 232, 253, 263, 279, 297, 327, 331, 339, 360, 433, 451, 485, 506, 536, 541, 607, 696, 708, 717, 768, 799, 801, 806, 904, 913, 1015, 1059, 1110, 1111
Offset: 1

Views

Author

Hugo Pfoertner, Dec 09 2021

Keywords

Comments

All terms are empirical subject to the validity of Legendre's conjecture and the boundedness of the scatter band of A014085. See there for further information.

Examples

			a(1)=1: the interval [1^2, 2^2] contains A349999(1)=2 primes {2, 3}, and no later interval contains less than 2 primes.
a(2)=7: the interval [7^2, 8^2] contains A349999(2)=3 primes {53, 59, 61}, and no later interval contains less than 3 primes.
a(12)=58: the interval [58^2, 59^2] contains A349999(12)=13 primes {3371, ..., 3469}, and no later interval contains less than 13 primes.
a(13)=85: the interval [85^2, 86^2] contains A349999(13)=16 primes {7229, ..., 7393}, and no later interval contains less than 16 primes.
		

Crossrefs

Formula

A014085(k) >= A014085(a(n)) for all k >= a(n).

A349998 Numbers k such that the number of primes in any interval [j^2,(j+1)^2], j>k exceeds the number of primes in the interval [k^2,(k+1)^2].

Original entry on oeis.org

5, 9, 14, 17, 23, 26, 30, 42, 49, 55, 56, 80, 85, 89, 119, 137, 143, 149, 156, 174, 178, 188, 194, 200, 207, 219, 228, 247, 261, 263, 279, 297, 327, 335, 356, 425, 433, 451, 485, 506, 536, 600, 607, 696, 708, 749, 768, 799, 801, 898, 904, 955, 1015, 1059, 1110
Offset: 1

Views

Author

Hugo Pfoertner, Dec 09 2021

Keywords

Comments

All terms are empirical subject to the validity of Legendre's conjecture and the boundedness of the scatter band of A014085. See there for further information.

Examples

			a(1)=5: There are 2 = A349999(1) primes {29, 31} between 5^2 and 6^2. All intervals between squares above contain at least 3 primes.
a(2)=9: The interval [9^2, 10^2] is the last interval containing not more than 3 = A349999(2) primes {83, 89, 97}.
a(12)=80: The interval [80^2,81^2] is the last interval containing not more than 13 = A349999(12) primes {6421, ..., 6553}.
a(13)=85: The interval [85^2,86^2] is the last interval containing not more than 16 = A349999(13) primes {7229, ..., 7393}.
		

Crossrefs

Formula

A014085(k) > A014085(a(n)) for all k > a(n).
Previous Showing 41-50 of 114 results. Next