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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A304917 a(n) = prime(n)^n - primorial(n - 1). 1
 1, 7, 119, 2371, 160841, 4824499, 410308643, 16983052531, 1801142961773, 420707010207331, 25408470426711601, 6582951805279545151, 925103094894275494511, 73885357039888240238239, 12063348337737606907045313, 3876269049503627062809380911 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS a(n) is mostly composite but sometimes prime, whereas prime(n) - p#(n) is always composite. See A305076 for n such that a(n) is prime. LINKS FORMULA a(n) = A062457(n) - A002110(n-1). EXAMPLE a(1) = prime(1)^1 - primorial(0) = 2^1 - 1 = 1. MAPLE N:=15: forX 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 *) PROG (PARI) a(n) = prime(n) ^ n - factorback(primes(n - 1)) \\ David A. Corneth, May 21 2018 CROSSREFS Cf. A002110, A062457, A305076. Sequence in context: A221031 A221323 A268300 * A113667 A192565 A171209 Adjacent sequences:  A304914 A304915 A304916 * A304918 A304919 A304920 KEYWORD nonn AUTHOR David James Sycamore, May 20 2018 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.

Last modified May 18 23:31 EDT 2022. Contains 353826 sequences. (Running on oeis4.)