cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A211889 Smallest positive d such that prime(n)+k*d is prime for 0 <= k <= n.

Original entry on oeis.org

1, 2, 6, 30, 60, 244230, 6930, 546840, 3120613860, 7399357350, 10719893274090, 173761834256010, 14772517344885300
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 13 2012

Keywords

Comments

a(n) = A211890(n,k+1) - A211890(n,k), 0 <= k < n.

Crossrefs

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

Formula

A010051(A000040(n) + k * a(n)) = 1, 0 <= k <= n.

Extensions

a(10) from Chai Wah Wu, Jun 29 2019
a(11)-a(13) from Giovanni Resta, Jun 30 2019