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

A229836 Number of primes between n! and n^n inclusive.

Original entry on oeis.org

0, 2, 6, 45, 415, 4693, 65010, 1073640, 20669837, 454793822, 11259684418, 309761863916, 9373389023182, 309374515194621, 11059527891811334, 425655578031419604, 17547665070746310736, 771403345825446116583, 36020103485009885093324
Offset: 1

Views

Author

Derek Orr, Dec 30 2013

Keywords

Examples

			There are 45 primes between 4! = 24 and 4^4 = 256.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A229836:=n->pi(n^n)-pi(n!): (0,2,seq(A229836(n), n=3..10)); # Wesley Ivan Hurt, Nov 17 2015
  • Mathematica
    Join[{0, 2}, Table[PrimePi[n^n] - PrimePi[n!], {n, 3, 12}]] (* Wesley Ivan Hurt, Nov 17 2015 *)
  • PARI
    a(n)=primepi(n^n)-primepi(n!-1) \\ Charles R Greathouse IV, Apr 30 2014
    
  • PARI
    a(n) = if(n==2, 2, primepi(n^n)-primepi(n!)) \\ Altug Alkan, Nov 17 2015
  • Python
    import math
    import sympy
    from sympy import sieve
    x = 1
    while x < 50:
        y = [i for i in sieve.primerange(math.factorial(x),x**x)]
        print(len(y))
        x += 1
    
  • Python
    from math import factorial
    from sympy import primepi
    def A229836(n): return primepi(n**n)-primepi(factorial(n)-1) # Chai Wah Wu, Jun 06 2024
    

Formula

a(n) = A064151(n) - A003604(n). Add 1 for n = 2 since 2! is prime. - Jens Kruse Andersen, Jul 29 2014

Extensions

a(12)-a(16) from Jens Kruse Andersen, Jul 29 2014
a(17)-a(18) from Chai Wah Wu, Jun 06 2024
a(19) from Amiram Eldar, Jun 11 2024

A065895 Which composite number is n^n ?: a(n) = k such that A002808(k) = n^n, or 0 if n^n is not composite.

Original entry on oeis.org

0, 1, 17, 201, 2679, 41834, 757857, 15699344, 366719682, 9544947488, 274049557236, 8606313278052, 293501427948319, 10802628699872589, 426834313802135110, 18021087789674333872, 809692585861972457700, 38575004548436059251080, 1942399549000209200252133
Offset: 1

Views

Author

Labos Elemer, Nov 28 2001

Keywords

Examples

			For n = 3: 3^3 = 27 = A002808(17) is the 17th composite number.
		

Crossrefs

Programs

  • Mathematica
    Table[n^n - PrimePi[n^n] - 1, {n, 1, 12}]
  • PARI
    a(n) = my(m = n^n); m - primepi(m) - 1; \\ Amiram Eldar, Aug 09 2024

Formula

a(n) = n^n - A064151(n) - 1. - Amiram Eldar, Aug 09 2024

Extensions

More terms from Robert G. Wilson v and Vladeta Jovovic, Nov 29 2001
Name clarified and a(13)-a(19) calculated from the data at A064151 and added by Amiram Eldar, Aug 09 2024

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

Original entry on oeis.org

2, 7, 45, 391, 4376, 60864, 1012186, 19622935, 434351705, 10807060863, 298525056829, 9063891473730, 300004447041493, 10750198453038838, 414596707456493479, 17122019740329088733, 753855850836114017867, 35248703133243910547502
Offset: 1

Views

Author

Amarnath Murthy, Dec 24 2001

Keywords

Examples

			a(2) = 7 as there are 7 primes between 2^2 (= 4) and 3^3 (= 27) namely 5, 7, 11, 13, 17, 19, and 23.
		

Crossrefs

Equals first differences of A064151.

Programs

Extensions

Corrected and extended by Robert G. Wilson v, Dec 26 2001
a(12)-a(14) from Donovan Johnson, Oct 14 2010
a(15)-a(18) from Amiram Eldar, Jun 11 2024

A086693 Number of primes less than prime(n)^prime(n).

Original entry on oeis.org

2, 9, 445, 65685, 11262113374, 9373678643933, 17547676024364306476, 36020106660104388871845
Offset: 1

Views

Author

Cino Hilliard, Jul 28 2003

Keywords

Examples

			There are 9 primes less than 3^3 = 27, namely 2,3,5,7,11,13,17,19,23. Since 3 is prime(2), a(2) = 9.
		

Crossrefs

Cf. A064151.

Programs

  • Magma
    [ #PrimesUpTo(NthPrime(n)^NthPrime(n)): n in [1..4] ]; // Vincenzo Librandi, Mar 17 2015
  • Mathematica
    f[n_] := Block[{p = Prime@ n}, PrimePi[p^p]]; Array[f, 5] (* Michael De Vlieger, Mar 17 2015 *)
  • PARI
    primeslesspp(n) = /* primes less than p^p */ { forprime(x=2, n, y=primepi(x^x); print1(y", "); ); }
    

Formula

a(n) = A064151(prime(n)) = A000720(A051674(n)). - Michel Marcus, Mar 17 2015

Extensions

a(5)-a(7) from David Baugh, Mar 17 2015
a(8) from Chai Wah Wu, Apr 18 2018
Showing 1-4 of 4 results.