A065892
Which composite number is n! ?: a(n) = k such that A002808(k) = n!, or 0 if n! is not composite.
Original entry on oeis.org
0, 0, 2, 14, 89, 591, 4364, 36088, 331910, 3370110, 37487843, 453695312, 5937400048, 83567800394, 1258987455069, 20216786089860, 344733810100259, 6221338673520239, 118470005905053478, 2374008406467087461, 49939116469530531211, 1100312192659475223331, 25340966583568917929966
Offset: 1
For n = 4: 4! = 24 = A002808(14) is the 14th composite number.
-
Table[n! - PrimePi[n!] - 1, {n, 1, 12}]
-
a(n) = my(f = n!); f - primepi(f) - 1; \\ Amiram Eldar, Aug 09 2024
Name clarified and a(17)-a(23) from
Amiram Eldar, Aug 09 2024
A067393
Number of nonprimes among the numbers in {1,2,3,...,n!} which are relatively prime to n!.
Original entry on oeis.org
1, 1, 1, 1, 1, 5, 67, 481, 4989, 51979, 570755, 5865449, 74226518, 904772855, 13111019601, 202135743076, 3307158697867, 53256981940267, 974755766640247, 17629139875485487, 357191085875727470, 7585952737111971220, 168542590546266903340, 3718034609300727209976
Offset: 0
For n = 5, n! = 120, a(5) = phi(120) - pi(120) + pi(5) = 32 - 30 + 3 = 5; the 5 nonprimes are 1, 49, 77, 91, 119.
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
There are 45 primes between 4! = 24 and 4^4 = 256.
-
with(numtheory): A229836:=n->pi(n^n)-pi(n!): (0,2,seq(A229836(n), n=3..10)); # Wesley Ivan Hurt, Nov 17 2015
-
Join[{0, 2}, Table[PrimePi[n^n] - PrimePi[n!], {n, 3, 12}]] (* Wesley Ivan Hurt, Nov 17 2015 *)
-
a(n)=primepi(n^n)-primepi(n!-1) \\ Charles R Greathouse IV, Apr 30 2014
-
a(n) = if(n==2, 2, primepi(n^n)-primepi(n!)) \\ Altug Alkan, Nov 17 2015
-
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
-
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
A076960
a(n) is the number of primes between n! and (2n)!.
Original entry on oeis.org
0, 8, 125, 4222, 258659, 25306159, 3610490130, 706003793908, 181035032176791, 58893601709293849, 23688535118130027712, 11539922212278290441881
Offset: 1
a(2) = 8 as pi(24) = 9 and pi(2) = 1.
-
with(numtheory): 0,seq(pi((2*n)!)-pi(n!),n=2..5); # Emeric Deutsch, Jul 31 2005
-
a[n_] := PrimePi[(2n)! - 1] - PrimePi[n! ]; Table[a[n], {n, 1, 8}] (* Ryan Propper, Sep 11 2005 *)
A082879
Number of primes not exceeding the factorial of the n-th prime.
Original entry on oeis.org
1, 3, 30, 675, 2428956, 289620751, 10953617995740, 3175094503778521, 511050155316058710033
Offset: 1
A309396
Number of lucky numbers <= n!.
Original entry on oeis.org
1, 1, 1, 2, 7, 26, 115, 614, 3866, 28339, 237017, 2227657, 23233568, 266201749
Offset: 0
a(1) = 1 because there is one lucky number (1) <= 1 (1!).
a(3) = 2 because there are two lucky numbers (1, 3) <= 6 (3!).
-
def lucky(n):
L=list(range(1, n+1, 2)); j=1
while L[j] <= len(L)-1:
L=[L[i] for i in range(len(L)) if (i+1)%L[j]!=0]
j+=1
return(L)
A000959=lucky(factorial(10))
def lucky_range(a,b):
lucky = []
for l in A000959:
if l >= b:
return lucky
if l>=a: lucky.append(l)
[ len(lucky_range(0,factorial(n)+1)) for n in range(10) ]