login
A119410
a(n) is the least k such that k*prime(n)# - prime(n+1) and k*prime(n)# + prime(n+1) are consecutive primes, where prime(n)# is the n-th primorial.
0
13, 24, 4, 26, 16, 66, 28, 1, 5, 42, 10, 19, 33, 12, 48, 156, 26, 170, 35, 24, 49, 70, 160, 59, 52, 141, 105, 146, 154, 103, 174, 114, 140, 314, 615, 97, 42, 6, 781, 240, 8, 71, 764, 14, 321, 197, 916, 945, 901, 23, 390, 479, 1549, 646, 117, 622, 912, 671, 1577
OFFSET
1,1
EXAMPLE
13*2 - 3 = 23, 13*2 + 3 = 29, 23 and 29 are consecutive primes, so a(1) = 13.
4*2*3*5 - 7 = 113, 4*2*3*5 + 7 = 127, 113 and 127 are consecutive primes, so a(3) = 4.
MATHEMATICA
a[n_] := Module[{k = 1, p = Product[Prime[i], {i, 1, n}], p1 = Prime[n+1]}, While[!PrimeQ[k*p - p1] || NextPrime[k*p - p1] != k*p + p1, k++]; k]; Array[a, 60] (* Amiram Eldar, Aug 28 2021 *)
CROSSREFS
Cf. A002110.
Sequence in context: A185684 A018945 A018958 * A098927 A133785 A136316
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 26 2006
EXTENSIONS
More terms from Amiram Eldar, Aug 28 2021
STATUS
approved