|
|
A101047
|
|
a(n) is the least k such that k*(prime(n)#)^prime(n)-1 is prime, where prime(n)# is the n-th primorial.
|
|
0
|
|
|
1, 2, 3, 15, 13, 6, 12, 23, 44, 5, 33, 153, 82, 63, 133, 376, 162, 340, 1009, 30, 9, 12, 2818, 843, 1343, 1348, 42, 125, 1260, 2135, 1856, 2049, 2664, 4585, 2253, 1664, 5397, 2859, 4382, 620, 599, 1072
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) = 1 since 1*2^2 - 1 = 3 is prime.
a(2) = 2 since 2*(2*3)^3 - 1 = 431 is prime.
|
|
MATHEMATICA
|
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 *)
|
|
PROG
|
(Python)
from sympy import isprime, prime, primorial
def a(n):
k, t = 1, primorial(n)**prime(n)
while True:
if isprime(k*t - 1): return k
k += 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|