OFFSET
1,2
COMMENTS
Primorial(n) is the product of the first n primes (A002110), while prime(n) is the n-th prime.
The first 150000 terms are all either 1 or prime. In the first 150000 terms, this sequence generates 142977 unique primes.
a(n) = 1 for n = 1, 7, 232, 430 ... When a(n) > 1, it is greater than prime(n).
LINKS
Dmitry Kamenetsky, Table of n, a(n) for n = 1..150000
Carlos Rivera, Puzzle 937: A non-composite sequence?.
EXAMPLE
When n = 4, primorial(n) = 210, primorial(n)/prime(n+1) = 210/11 ~= 19.09..., thus X = 23 and a(n) = 23*11 - 210 = 43.
MATHEMATICA
Array[Block[{p = #1, B = #2, X = Floor[#2/#1] + 1}, While[GCD[B, X] != 1, X++]; X p - B] & @@ {First@ #1, Times @@ #2} & @@ TakeDrop[Prime@ Range@ #, -1] &, 60, 2] (* Michael De Vlieger, Jan 07 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Dmitry Kamenetsky, Jan 06 2019
STATUS
approved