A211889 Smallest positive d such that prime(n)+k*d is prime for 0 <= k <= n.
1, 2, 6, 30, 60, 244230, 6930, 546840, 3120613860, 7399357350, 10719893274090, 173761834256010, 14772517344885300
Offset: 1
Links
- Eric Weisstein's World of Mathematics, Prime Arithmetic Progression.
- Wikipedia, Primes in arithmetic progression.
- Index entries for sequences related to primes in arithmetic progressions
Programs
-
Haskell
a211889 n = head [k | let p = a000040 n, k <- [1..], all ((== 1) . a010051') $ map ((+ p) . (* k)) (a002260_row n)]
-
Python
from sympy import isprime, prime, primorial, primepi def A211889(n): if n == 1: return 1 delta = primorial(primepi(n)) p, d = prime(n), delta while True: q = p for _ in range(n): q += d if not isprime(q): break else: return d d += delta # Chai Wah Wu, Jun 28 2019
Extensions
a(10) from Chai Wah Wu, Jun 29 2019
a(11)-a(13) from Giovanni Resta, Jun 30 2019
Comments