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-10 of 14 results. Next

A078507 Duplicate of A060199.

Original entry on oeis.org

0, 4, 5, 9, 12, 17, 21, 29, 32, 39, 49, 52, 58, 73, 76, 88, 92, 109, 117, 125, 140, 151, 159
Offset: 0

Views

Author

Keywords

A014085 Number of primes between n^2 and (n+1)^2.

Original entry on oeis.org

0, 2, 2, 2, 3, 2, 4, 3, 4, 3, 5, 4, 5, 5, 4, 6, 7, 5, 6, 6, 7, 7, 7, 6, 9, 8, 7, 8, 9, 8, 8, 10, 9, 10, 9, 10, 9, 9, 12, 11, 12, 11, 9, 12, 11, 13, 10, 13, 15, 10, 11, 15, 16, 12, 13, 11, 12, 17, 13, 16, 16, 13, 17, 15, 14, 16, 15, 15, 17, 13, 21, 15, 15, 17, 17, 18, 22, 14, 18, 23, 13
Offset: 0

Views

Author

Jon Wild, Jul 14 1997

Keywords

Comments

Suggested by Legendre's conjecture (still open) that for n > 0 there is always a prime between n^2 and (n+1)^2.
a(n) is the number of occurrences of n in A000006. - Philippe Deléham, Dec 17 2003
See the additional references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
Legendre's conjecture may be written pi((n+1)^2) - pi(n^2) > 0 for all positive n, where pi(n) = A000720(n), [the prime counting function]. - Jonathan Vos Post, Jul 30 2008 [Comment corrected by Jonathan Sondow, Aug 15 2008]
Legendre's conjecture can be generalized as follows: for all integers n > 0 and all real numbers k > K, there is a prime in the range n^k to (n+1)^k. The constant K is conjectured to be log(127)/log(16). See A143935. - T. D. Noe, Sep 05 2008
For n > 0: number of occurrences of n^2 in A145445. - Reinhard Zumkeller, Jul 25 2014

Examples

			a(17) = 5 because between 17^2 and 18^2, i.e., 289 and 324, there are 5 primes (which are 293, 307, 311, 313, 317).
		

References

  • J. R. Goldman, The Queen of Mathematics, 1998, p. 82.

Crossrefs

First differences of A038107.
Counts of primes between consecutive higher powers: A060199, A061235, A062517.

Programs

  • Haskell
    a014085 n = sum $ map a010051 [n^2..(n+1)^2]
    -- Reinhard Zumkeller, Mar 18 2012
    
  • Mathematica
    Table[PrimePi[(n + 1)^2] - PrimePi[n^2], {n, 0, 80}] (* Lei Zhou, Dec 01 2005 *)
    Differences[PrimePi[Range[0,90]^2]] (* Harvey P. Dale, Nov 25 2015 *)
  • PARI
    a(n)=primepi((n+1)^2)-primepi(n^2) \\ Charles R Greathouse IV, Jun 15 2011
    
  • Python
    from sympy import primepi
    def a(n): return primepi((n+1)**2) - primepi(n**2)
    print([a(n) for n in range(81)]) # Michael S. Branicky, Jul 05 2021

Formula

a(n) = A000720((n+1)^2) - A000720(n^2). - Jonathan Vos Post, Jul 30 2008
a(n) = Sum_{k = n^2..(n+1)^2} A010051(k). - Reinhard Zumkeller, Mar 18 2012
Conjecture: for all n>1, abs(a(n)-(n/log(n))) < sqrt(n). - Alain Rocchelli, Sep 20 2023
Up to n=10^6 there are no counterexamples to this conjecture. - Hugo Pfoertner, Dec 16 2024
Sorenson & Webster show that a(n) > 0 for all 0 < n < 7.05 * 10^13. - Charles R Greathouse IV, Jan 31 2025

A068695 Smallest number (not beginning with 0) that yields a prime when placed on the right of n.

Original entry on oeis.org

1, 3, 1, 1, 3, 1, 1, 3, 7, 1, 3, 7, 1, 9, 1, 3, 3, 1, 1, 11, 1, 3, 3, 1, 1, 3, 1, 1, 3, 7, 1, 17, 1, 7, 3, 7, 3, 3, 7, 1, 9, 1, 1, 3, 7, 1, 9, 7, 1, 3, 13, 1, 23, 1, 7, 3, 1, 7, 3, 1, 3, 11, 1, 1, 3, 1, 3, 3, 1, 1, 9, 7, 3, 3, 1, 1, 3, 7, 7, 9, 1, 1, 9, 19, 3, 3, 7, 1, 23, 7, 1, 9, 7, 1, 3, 7, 1, 3, 1, 9, 3, 1
Offset: 1

Views

Author

Amarnath Murthy, Mar 03 2002

Keywords

Comments

Max Alekseyev (see link) shows that a(n) always exists. Note that although his argument makes use of some potentially large constants (see the comments in A060199), the proof shows that a(n) exists for all n. - N. J. A. Sloane, Nov 13 2020
Many numbers become prime by appending a one-digit odd number. Some numbers (such as 20, 32, 51, etc.) require a 2-digit odd number (A032352 has these). In the first 100000 values of n there are only 22 that require a 3-digit odd number (A091089). There probably are some values that require odd numbers of 4 or more digits, but these are likely to be very large. - Chuck Seggelin, Dec 18 2003

Examples

			a(20)=11 because 11 is the minimum odd number which when appended to 20 forms a prime (201, 203, 205, 207, 209 are all nonprime, 2011 is prime).
		

Crossrefs

Cf. A032352 (a(n) requires at least a 2 digit odd number), A091089 (a(n) requires at least a 3 digit odd number).
Cf. also A060199, A228325, A336893.

Programs

  • Mathematica
    d[n_]:=IntegerDigits[n]; t={}; Do[k=1; While[!PrimeQ[FromDigits[Join[d[n],d[k]]]],k++]; AppendTo[t,k],{n,102}]; t (* Jayanta Basu, May 21 2013 *)
    mon[n_]:=Module[{k=1},While[!PrimeQ[n*10^IntegerLength[k]+k],k+=2];k]; Array[mon,110] (* Harvey P. Dale, Aug 13 2018 *)
  • PARI
    A068695=n->for(i=1,oo,ispseudoprime(eval(Str(n,i)))&&return(i)) \\ M. F. Hasler, Oct 29 2013
    
  • Python
    from sympy import isprime
    from itertools import count
    def a(n): return next(k for k in count(1) if isprime(int(str(n)+str(k))))
    print([a(n) for n in range(1, 103)]) # Michael S. Branicky, Oct 18 2022

Extensions

More terms from Chuck Seggelin, Dec 18 2003
Entry revised by N. J. A. Sloane, Feb 20 2006
More terms from David Wasserman, Feb 14 2006

A014220 Next prime after n^3.

Original entry on oeis.org

2, 2, 11, 29, 67, 127, 223, 347, 521, 733, 1009, 1361, 1733, 2203, 2749, 3389, 4099, 4919, 5839, 6863, 8009, 9277, 10651, 12197, 13829, 15629, 17579, 19687, 21961, 24391, 27011, 29803, 32771, 35951, 39313
Offset: 0

Views

Author

Keywords

Comments

According to Borwein's Remark 1, this is an example of a sequence of primes whose mean value is in [0,1]. - T. D. Noe, Sep 15 2008
More precisely, Borwein, Choi and Coons remark that the generalized Liouville function for this sequence has mean value in (0,1). - Jonathan Sondow, May 19 2013

Crossrefs

Programs

Formula

a(n) < (n+1)^3 for n sufficiently large, by Ingham's theorem in A060199. - Jonathan Sondow, May 19 2013

A077037 Largest prime < n^3.

Original entry on oeis.org

7, 23, 61, 113, 211, 337, 509, 727, 997, 1327, 1723, 2179, 2741, 3373, 4093, 4909, 5827, 6857, 7993, 9257, 10639, 12163, 13807, 15619, 17573, 19681, 21943, 24379, 26993, 29789, 32749, 35933, 39301, 42863, 46649, 50651, 54869, 59281, 63997
Offset: 2

Views

Author

Reinhard Zumkeller, Oct 21 2002

Keywords

Crossrefs

Programs

  • Mathematica
    PrimePrev[n_]:=Module[{k},k=n-1;While[ !PrimeQ[k],k-- ];k];f[n_]:=n^3;lst={};Do[AppendTo[lst,PrimePrev[f[n]]],{n,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Feb 25 2010 *)
    Table[NextPrime[n^3, -1], {n, 2, 40}] (* Robert G. Wilson v, Aug 17 2010 *)
  • PARI
    a(n) = precprime(n^3); \\ Michel Marcus, Jan 14 2023
  • Python
    from sympy import prevprime
    def a(n):  return prevprime(n**3)
    print([a(n) for n in range(2, 41)]) # Michael S. Branicky, Jul 23 2021
    

Formula

a(n) > (n-1)^3 for all large n, by Ingham's theorem (see A060199). - Jonathan Sondow, Mar 27 2014

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

A061235 Number of primes between n^4 and (n+1)^4.

Original entry on oeis.org

0, 6, 16, 32, 60, 96, 147, 207, 283, 382, 486, 619, 773, 945, 1139, 1351, 1610, 1870, 2165, 2496, 2848, 3237, 3653, 4125, 4572, 5118, 5698, 6269, 6894, 7586, 8309, 9033, 9907, 10656, 11616, 12522, 13509, 14552, 15639, 16708, 18009, 19140, 20527
Offset: 0

Views

Author

Amarnath Murthy, Apr 23 2001

Keywords

Examples

			a(3) = 32, as the number of primes between 3^4 = 81 and 4^4 = 256 is 32.
		

Crossrefs

Programs

  • Magma
    [0] cat [#PrimesInInterval(n^4, (n+1)^4): n in [1..50]]; // Vincenzo Librandi, Apr 30 2017
  • Mathematica
    Table[PrimePi[(w+1)^4]-PrimePi[w^4], {w, 0, 100}]
  • PARI
    a(n) = primepi((n+1)^4) - primepi(n^4); \\ Michel Marcus, Apr 29 2017
    

Extensions

More terms from Labos Elemer, Jul 10 2001
Edited for consistency by Peter Munn, Apr 28 2017

A062517 Number of primes between n^5 and (n+1)^5.

Original entry on oeis.org

0, 11, 42, 119, 273, 540, 954, 1573, 2456, 3624, 5181, 7177, 9666, 12797, 16514, 21098, 26454, 32836, 40134, 48760, 58508, 69714, 82277, 96723, 112702, 130639, 150488, 172617, 197039, 223915, 253318, 285540, 320450, 358839, 400159, 445011, 493504
Offset: 0

Views

Author

Labos Elemer, Jul 10 2001

Keywords

Examples

			a(1) = 11 the number of primes between 1 = 1^5 and 32 = 2^5.
		

Crossrefs

Programs

  • Mathematica
    Table[PrimePi[(w+1)^5]-PrimePi[w^5], {w, 0, 50}]
  • PARI
    a(n) = { primepi((n + 1)^5) - primepi((n)^5) } \\ Harry J. Smith, Aug 08 2009

Extensions

Edited for consistency by Peter Munn, Apr 30 2017

A060303 Number of primes below n^2 does not exceed n times the number of primes below n.

Original entry on oeis.org

0, 0, 2, 2, 6, 7, 13, 14, 14, 15, 25, 26, 39, 40, 42, 42, 58, 60, 80, 82, 83, 84, 108, 111, 111, 112, 114, 115, 144, 146, 179, 180, 182, 183, 185, 186, 225, 228, 228, 229, 270, 272, 319, 321, 324, 325, 376, 378, 378, 383, 387, 387, 439, 443, 446, 451, 455, 454
Offset: 1

Views

Author

Labos Elemer, Mar 26 2001

Keywords

Examples

			pi(100) = 25, 10*pi(10) = 40, a(10) = 40-25 = 15.
		

Crossrefs

Formula

Table[n*PrimePi[n]-PrimePi[n^2], {n, 1, 100}]

Extensions

Offset corrected by Amiram Eldar, Sep 06 2024

A060304 Number of primes below n^3 does not exceed n times the number of primes below n^2.

Original entry on oeis.org

0, 0, 3, 6, 15, 19, 37, 47, 69, 82, 113, 139, 180, 216, 244, 300, 381, 423, 486, 553, 638, 726, 820, 887, 1029, 1152, 1256, 1376, 1527, 1659, 1794, 1992, 2156, 2357, 2517, 2739, 2909, 3085, 3365, 3627, 3933, 4200, 4380, 4687, 4960, 5313, 5547, 5917, 6395
Offset: 0

Views

Author

Labos Elemer, Mar 26 2001

Keywords

Examples

			n=10, 10*pi(100)=250, pi(1000)=168, a(10)=250-168=82.
		

Crossrefs

Programs

  • Mathematica
    Table[n*PrimePi[n^2]-PrimePi[n^3], {n, 1, 100}]

Formula

a(n) = n*pi(n*n) - pi(n*n*n). - Jonathan Sondow, Feb 17 2014
a(n) = n*A038107(n) - A038098(n). - Michel Marcus, Feb 17 2014
Showing 1-10 of 14 results. Next