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

A304917 a(n) = prime(n)^n - primorial(n - 1).

Original entry on oeis.org

1, 7, 119, 2371, 160841, 4824499, 410308643, 16983052531, 1801142961773, 420707010207331, 25408470426711601, 6582951805279545151, 925103094894275494511, 73885357039888240238239, 12063348337737606907045313, 3876269049503627062809380911
Offset: 1

Views

Author

David James Sycamore, May 20 2018

Keywords

Examples

			a(1) = prime(1)^1 - primorial(0) = 2^1 - 1 = 1.
		

Crossrefs

Cf. A002110, A062457, A305076 (n such that a(n) is prime).

Programs

  • Maple
    N:=15:
    for X from 1 to N do
    Z:=mul(ithprime(i),i=1..(X-1));
    Y:=(ithprime(X)^X-Z);
    print(Y);
    end do:
    # Second Maple program
    seq(ithprime(k)^k-mul(ithprime(i),i=1..k-1),k=1..15);  # Muniru A Asiru, Jul 08 2018
  • Mathematica
    Fold[Append[#1, {#1 - #2, #2} & @@ {Prime[#2]^#2, Prime[#2 - 1] #1[[-1, -1]]}] &, {{1, 1}}, Range[2, 16]][[All, 1]] (* Michael De Vlieger, Jul 19 2018 *)
  • PARI
    a(n) = prime(n)^n - factorback(primes(n - 1)) \\ David A. Corneth, May 21 2018

Formula

a(n) = A062457(n) - A002110(n-1).
Showing 1-1 of 1 results.