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 11-16 of 16 results.

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

Views

Author

Labos Elemer, Nov 28 2001

Keywords

Examples

			For n = 4: 4! = 24 = A002808(14) is the 14th composite number.
		

Crossrefs

Programs

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

Formula

a(n) = n! - A003604(n) - 1. - Amiram Eldar, Aug 09 2024

Extensions

More terms from Robert G. Wilson v, Nov 29 2001
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

Views

Author

Labos Elemer, Jan 22 2002

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := EulerPhi[ n! ]-PrimePi[ n! ]+PrimePi[n]

Formula

a(n) = phi(n!) - pi(n!) + pi(n) = A000010(n!) - A000720(n!) + A000720(n).

Extensions

a(18)-a(19) from Donovan Johnson, Mar 24 2011
a(20)-a(23) from Giovanni Resta, Oct 29 2019

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

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

Views

Author

Amarnath Murthy, Oct 21 2002

Keywords

Examples

			a(2) = 8 as pi(24) = 9 and pi(2) = 1.
		

Crossrefs

Programs

  • Maple
    with(numtheory): 0,seq(pi((2*n)!)-pi(n!),n=2..5); # Emeric Deutsch, Jul 31 2005
  • Mathematica
    a[n_] := PrimePi[(2n)! - 1] - PrimePi[n! ]; Table[a[n], {n, 1, 8}] (* Ryan Propper, Sep 11 2005 *)

Formula

a(n) = A003604(2*n) - A003604(n), for n >= 2. - Amiram Eldar, Jun 11 2024

Extensions

Corrected and extended by Emeric Deutsch, Jul 31 2005
a(7)-a(8) from Ryan Propper, Sep 11 2005
a(9) from Donovan Johnson, Mar 10 2010
a(10)-a(12) from Amiram Eldar, Jun 11 2024

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

Views

Author

Labos Elemer, Apr 16 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Table[PrimePi[Prime[j]! ], {j, 1, 6}]

Formula

a(n) = A000720(A000142(A000040(n))).
a(n) = A003604(prime(n)). - Amiram Eldar, Jun 06 2024

Extensions

a(7) from Donovan Johnson, Dec 15 2009
a(8) from Donovan Johnson, Feb 18 2010
a(9) from the data at A003604 added by Amiram Eldar, Jun 06 2024

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

Views

Author

Hauke Löffler, Jul 28 2019

Keywords

Examples

			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!).
		

Crossrefs

Programs

  • SageMath
    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) ]

Extensions

a(10)-a(12) from Giovanni Resta, May 10 2020
a(13) from Kevin P. Thompson, Nov 24 2021
Previous Showing 11-16 of 16 results.