login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A229836 Number of primes between n! and n^n inclusive. 1
0, 2, 6, 45, 415, 4693, 65010, 1073640, 20669837, 454793822, 11259684418, 309761863916, 9373389023182, 309374515194621, 11059527891811334, 425655578031419604 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = A064151(n) - A003604(n). Add 1 for n=2 since 2! is prime. - Jens Kruse Andersen, Jul 29 2014
EXAMPLE
There are 45 primes between 4! and 4^4 (24,256).
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 *)
PROG
(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
(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
CROSSREFS
Sequence in context: A332757 A255015 A347984 * A359659 A370818 A367916
KEYWORD
nonn,more
AUTHOR
Derek Orr, Dec 30 2013
EXTENSIONS
a(12)-a(16) from Jens Kruse Andersen, Jul 29 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 00:03 EDT 2024. Contains 371798 sequences. (Running on oeis4.)