%I #23 May 15 2023 08:43:09
%S 1,2,3,15,13,6,12,23,44,5,33,153,82,63,133,376,162,340,1009,30,9,12,
%T 2818,843,1343,1348,42,125,1260,2135,1856,2049,2664,4585,2253,1664,
%U 5397,2859,4382,620,599,1072
%N a(n) is the least k such that k*(prime(n)#)^prime(n)-1 is prime, where prime(n)# is the n-th primorial.
%e a(1) = 1 since 1*2^2 - 1 = 3 is prime.
%e a(2) = 2 since 2*(2*3)^3 - 1 = 431 is prime.
%t a[n_] := Module[{k = 1, p = Product[Prime[i], {i,1,n}]^Prime[n]}, While[!PrimeQ[k*p-1], k++]; k]; Array[a, 50] (* _Amiram Eldar_, Jul 17 2021 *)
%o (Python)
%o from sympy import isprime, prime, primorial
%o def a(n):
%o k, t = 1, primorial(n)**prime(n)
%o while True:
%o if isprime(k*t - 1): return k
%o k += 1
%o print([a(n) for n in range(1, 15)]) # _Michael S. Branicky_, Jan 29 2022
%Y Cf. A002110.
%K nonn,more
%O 1,2
%A _Pierre CAMI_, Jan 21 2005
%E a(27)-a(32) from _Amiram Eldar_, Jul 17 2021
%E a(33)-a(34) from _Michael S. Branicky_, Jan 29 2022
%E a(35)-a(36) from _Michael S. Branicky_, Feb 03 2022
%E a(37)-a(42) from _Michael S. Branicky_, May 14 2023