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 31-40 of 40 results.

A239942 a(n) = prime(n)! - prime(n - 1)!.

Original entry on oeis.org

4, 114, 4920, 39911760, 6187104000, 355681201075200, 121289412980736000, 25851895093784567808000, 8841761967887685215658639360000, 8213996892184183115771019264000000, 13763753083003506392138056763855339520000000
Offset: 2

Views

Author

Norman Koch, Mar 29 2014

Keywords

Examples

			a(3) = Prime(3)! - Prime(2)! = 5! - 3! = 120 - 6 = 114.
		

Crossrefs

Programs

  • Maple
    A239942:=n->ithprime(n)!-ithprime(n-1)!: seq(A239942(n), n=2..15); # Wesley Ivan Hurt, Aug 03 2014
  • Mathematica
    a239942[n_Integer] := Prime[n]! - Prime[n - 1]!; Table[a239942[n], {n, 2, 87}] (* Michael De Vlieger, Aug 03 2014 *)
  • PARI
    a(n)=prime(n)! - prime(n-1)!;
    vector(22,n,a(n+1)) \\ Joerg Arndt, Mar 31 2014
    
  • Perl
    #!/usr/bin/perl
    use strict;
    use warnings;
    use feature 'say';
    use Math::Prime::XS qw(is_prime);
    use Memoize;
    use Math::BigInt;
    memoize('factorial');
    use Data::Dumper;
    my @primes = ();
    for (2 .. 200) {
            if(is_prime($_)) {
                    push @primes, $_;
            }
    }
    for (1 .. $#primes) {
            say factorial($primes[$]) - factorial($primes[$ - 1]);
    }
    sub factorial {
            my $x = Math::BigInt->new(shift);
            return $x if $x == 1;
            return factorial($x - 1) * $x;
    }
    
  • Python
    from gmpy2 import mpz,fac
    from sympy import prime
    def A239942(n):
        return fac(mpz(prime(n))) - fac(mpz(prime(n-1))) # Chai Wah Wu, Aug 06 2014

Formula

a(n) = A039716(n) - A039716(n-1).

A261457 a(n) = prime(n)! - n!.

Original entry on oeis.org

1, 4, 114, 5016, 39916680, 6227020080, 355687428090960, 121645100408791680, 25852016738884976277120, 8841761993739701954543612371200, 8222838654177922817725562840083200, 13763753091226345046315979581580901920998400
Offset: 1

Views

Author

Altug Alkan, Aug 19 2015

Keywords

Examples

			The 3rd prime is 5, a(3)= 5! - 3! = 114.
		

Crossrefs

Programs

Formula

a(n) = prime(n)! - n! = A039716(n) - A000142(n).

A261523 a(n) = prime(n+1)! / (prime(n+1) - prime(n))!.

Original entry on oeis.org

6, 60, 2520, 1663200, 3113510400, 14820309504000, 60822550204416000, 1077167364120207360000, 12280224991305141603532800000, 4111419327088961408862781440000000, 19116323737814368119883304974417920000000, 1393855275548491962840419252226697986048000000000, 30207631531686917818677566034256998753632256000000000
Offset: 1

Views

Author

Altug Alkan, Aug 23 2015

Keywords

Comments

The author comments that this sequence is related to the product A058077(n) * A039716(n). - Charles R Greathouse IV, Aug 29 2015

Crossrefs

Programs

  • Magma
    [Factorial(NthPrime(n+1)) / Factorial((NthPrime(n+1) - NthPrime(n))): n in [1..15]]; // Vincenzo Librandi, Aug 23 2015
  • Maple
    A261523:=n->ithprime(n+1)!/(ithprime(n+1)-ithprime(n))!: seq(A261523(n), n=1..15); # Wesley Ivan Hurt, Aug 23 2015
  • Mathematica
    Table[Prime[i + 1]!/(Prime[i + 1] - Prime[i])!, {i, 15}] (* Vincenzo Librandi, Aug 23 2015 *)
  • PARI
    vector( 15,  n,  prime(n+1)! / (prime(n+1) - prime(n))! )
    
  • PARI
    vector( 15,  n,  binomial(prime(n+1), prime(n)) * prime(n)! )
    

Formula

a(n) = prime(n+1)! / (prime(n+1) - prime(n))! = A058077(n) * A039716(n).

A262204 a(n) = (2*prime(n))! / prime(n)!.

Original entry on oeis.org

12, 120, 30240, 17297280, 28158588057600, 64764752532480000, 830034394580628357120000, 4299578163927654889881600000, 212850788988365112429784203264000000, 265847614191284935213187014536606662000640000000
Offset: 1

Views

Author

Altug Alkan, Sep 15 2015

Keywords

Comments

Inspired by simplicity of sequence formula that is (p + p)!/p! where p is n-th prime number.

Examples

			For n=1, a(n) = (2*prime(n))! / prime(n)! = 4!/2! = 3*4 = 12.
For n=2, a(n) = (2*prime(n))! / prime(n)! = 6!/3! = 4*5*6 = 120.
For n=3, a(n) = (2*prime(n))! / prime(n)! = 10!/5! = 6*7*8*9*10 = 30240.
		

Crossrefs

Programs

  • Magma
    [Factorial(NthPrime(n)+NthPrime(n)) / Factorial(NthPrime(n)): n in [1..10]]; // Vincenzo Librandi, Sep 16 2015
  • PARI
    a(n) = (2*prime(n))!/prime(n)!;
    vector(10, n, a(n))
    

Formula

a(n) = 2 * A075069(n).
a(n) = A001813(prime(n)). - Michel Marcus, Sep 20 2015
a(n) mod A039716(n) = 0.

A381665 Integers k such that prime(k)!/k^k is an integer.

Original entry on oeis.org

1, 12, 24, 36, 40, 45, 48, 60, 72, 80, 90, 96, 120, 144, 160, 180, 192, 210, 216, 224, 240, 252, 270, 280, 288, 315, 320, 336, 360, 378, 420, 432, 448, 480, 504, 540, 560, 576, 630, 640, 672, 720, 756, 840, 864, 896, 945, 960, 1008, 1080, 1120, 1134, 1152, 1200, 1260, 1280, 1296
Offset: 1

Views

Author

Michel Marcus, Mar 03 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[1296],IntegerQ[Prime[#]!/#^#]&] (* James C. McMahon, Mar 03 2025 *)
  • PARI
    isok(k) = Mod(prime(k)!, k^k) == 0;
    
  • Python
    from collections import Counter
    from itertools import count, islice
    from sympy import prime, factorint
    def A381665_gen(): # generator of terms
        c, p = Counter(), 1
        for k in count(1):
            q, m = prime(k), Counter({a:b*k for a, b in factorint(k).items()})
            c += sum((Counter(factorint(i)) for i in range(p+1,q+1)),start=Counter())
            if m<=c:
                yield k
            p = q
    A381665_list = list(islice(A381665_gen(),57)) # Chai Wah Wu, Mar 03 2025

A131491 a(n) = 2*prime(n)!.

Original entry on oeis.org

4, 12, 240, 10080, 79833600, 12454041600, 711374856192000, 243290200817664000, 51704033477769953280000, 17683523987479403909087232000000, 16445677308355845635451125760000000, 27527506182452690092631959163161804800000000
Offset: 1

Views

Author

Giovanni Teofilatto, Jul 29 2007

Keywords

Crossrefs

Programs

Formula

a(n) = 2*A039716(n) = 2*A000142(A000040(n)). - R. J. Mathar, Jul 31 2007

Extensions

More terms from Harvey P. Dale, Dec 19 2011

A262398 a(n) = prime(n)! mod prime(n!).

Original entry on oeis.org

0, 0, 3, 56, 511, 194, 46976, 104633, 546681, 41130177, 643108140, 7034542959, 65748733699, 1518781632657, 35097481516962, 396029533782911, 4146710666095789, 159899356955923308, 3662069108121609141, 109629928744379590001, 828180977946159463007
Offset: 1

Views

Author

Altug Alkan, Sep 21 2015

Keywords

Comments

Inspired by A261997.
a(n) = n and a(n) = prime(n-1) for n=3.
a(n) = 0 only for n=1 and n=2. What is the minimum value of a(n) for n > 2? Is there a possibility of observing that a(n) = 1 or a(n) = 2?

Examples

			a(1) = prime(1)! mod prime(1!) = 2 mod 2 = 0.
a(2) = prime(2)! mod prime(2!) = 6 mod 3 = 0.
a(3) = prime(3)! mod prime(3!) = 120 mod 13 = 3.
		

Crossrefs

Programs

  • Magma
    [Factorial(NthPrime(n)) mod NthPrime(Factorial(n)): n in [1..11]]; // Vincenzo Librandi, Sep 23 2015
  • Mathematica
    Table[Mod[Prime[n]!, Prime[n!]], {n, 15}] (* Michael De Vlieger, Sep 21 2015 *)
  • PARI
    a(n) = prime(n)! % prime(n!);
    vector(11, n, a(n))
    

Formula

a(n) = A039716(n) mod A062439(n).

Extensions

a(11)-a(15) from Michael De Vlieger, Sep 21 2015

A267897 a(n) = prime(n)! - prime(n).

Original entry on oeis.org

0, 3, 115, 5033, 39916789, 6227020787, 355687428095983, 121645100408831981, 25852016738884976639977, 8841761993739701954543615999971, 8222838654177922817725562879999969, 13763753091226345046315979581580902399999963
Offset: 1

Views

Author

Vincenzo Librandi, Jan 22 2016

Keywords

Crossrefs

Programs

  • Magma
    [Factorial(p)-p: p in PrimesUpTo(40)];
    
  • Mathematica
    Array[Prime[#]! - Prime[#] &, 20]
    #!-#&/@Prime[Range[20]] (* Harvey P. Dale, Oct 23 2024 *)
  • PARI
    lista(nn) = forprime(p=2, nn, print1(p! - p, ", ")); \\ Altug Alkan, Jan 23 2016

Formula

a(n) = A039716(n) - A000040(n).
a(n) = A005096(A000040(n)).

A267898 a(n) = prime(n)! + prime(n).

Original entry on oeis.org

4, 9, 125, 5047, 39916811, 6227020813, 355687428096017, 121645100408832019, 25852016738884976640023, 8841761993739701954543616000029, 8222838654177922817725562880000031, 13763753091226345046315979581580902400000037
Offset: 1

Views

Author

Vincenzo Librandi, Jan 22 2016

Keywords

Crossrefs

Programs

  • Magma
    [Factorial(p)+p: p in PrimesUpTo(40)];
    
  • Mathematica
    Array[Prime[#]! + Prime[#]&, 20]
    #!+#&/@Prime[Range[20]] (* Harvey P. Dale, Aug 04 2016 *)
  • PARI
    lista(nn) = forprime(p=2, nn, print1(p! + p, ", ")); \\ Altug Alkan, Jan 23 2016

Formula

a(n) = A039716(n) + A000040(n).
a(n) = A005095(A000040(n)).

A309789 Numbers n such that -1 + Sum_{k=1..n} prime(k)! is prime, where prime(k) is the k-th prime.

Original entry on oeis.org

2, 3, 4, 20, 25
Offset: 1

Views

Author

Metin Sariyar, Aug 17 2019

Keywords

Comments

The sequence is finite. Proof: for n=112, the sum is 2! + 3! + 5! + ... + 601! + 607! - 1, which is divisible by the next prime, 613. All the factorials of the subsequent primes 613!, 617!, ... are obviously divisible by 613. So after n=112 the sum will always be divisible by 613. And from n=26 to n=112 there are no other primes. So this sequence will not produce any other primes. - Metin Sariyar, Aug 26 2019

Examples

			4 is a term because 2, 3, 5, 7 are the first 4 primes and 2! + 3! + 5! + 7! - 1 = 5167 is prime.
		

Crossrefs

Programs

Previous Showing 31-40 of 40 results.