OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
1*(2*3)-1 = 5 is prime, so a(1) = 3 as 3# = 2*3.
2*(2)-1 = 3 is prime, so a(2) = 2 as 2# = 2.
MATHEMATICA
a[n_] := Module[{p = pr = 2}, While[!PrimeQ[pr * n - 1], p = NextPrime[p]; pr *= p]; p]; Array[a, 100] (* Amiram Eldar, Sep 11 2021 *)
PROG
(PARI) a(n) = {my(k = 1); while (!isprime(n*prod(j=1, k, prime(j)) - 1), k++); prime(k); } \\ Michel Marcus, Sep 14 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Pierre CAMI, May 14 2006
EXTENSIONS
More terms from David Wasserman, Jun 20 2007
STATUS
approved