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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
print([a(n) for n in range(1, 15)]) # Michael S. Branicky, Jan 29 2022
CROSSREFS
Cf. A002110.
Sequence in context: A075244 A342567 A088030 * A251618 A309765 A238691
KEYWORD
nonn,more
AUTHOR
Pierre CAMI, Jan 21 2005
EXTENSIONS
a(27)-a(32) from Amiram Eldar, Jul 17 2021
a(33)-a(34) from Michael S. Branicky, Jan 29 2022
a(35)-a(36) from Michael S. Branicky, Feb 03 2022
a(37)-a(42) from Michael S. Branicky, May 14 2023
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)