login
A126788
Least prime q such that q*prime(n)# - 1 and q*prime(n)# + 1 are twin primes where p(i)# = i-th primorial.
0
2, 2, 2, 2, 5, 11, 17, 11, 11, 37, 61, 23, 127, 53, 37, 1427, 23, 11, 491, 11, 1429, 139, 83, 547, 233, 881, 149, 47, 313, 2, 463, 857, 1367, 2269, 2221, 8171, 317, 619, 3727, 227, 173, 2251, 1091, 13, 439, 277, 1597, 433, 173, 1303, 2927, 1367, 6679, 4903, 1979
OFFSET
1,1
EXAMPLE
2*(2*3*5*7) - 1 = 419;
2*(2*3*5*7) + 1 = 421;
419 and 421 are twin primes, 2*3*5*7 = p(4)#, so a(4)=2.
PROG
(PARI) P(n) = prod(i=1, n, prime(i)); \\ A002110
a(n) = my(P=P(n), q=2); while(!ispseudoprime(P*q-1) || !ispseudoprime(P*q+1), q = nextprime(q+1)); q; \\ Michel Marcus, May 16 2022
CROSSREFS
Sequence in context: A352723 A222255 A350970 * A098789 A162489 A336486
KEYWORD
nonn
AUTHOR
Pierre CAMI, Feb 19 2007
EXTENSIONS
a(11) corrected by Seth A. Troisi, May 13 2022
STATUS
approved