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!)
A211889 Smallest positive d such that prime(n)+k*d is prime for 0 <= k <= n. 3
1, 2, 6, 30, 60, 244230, 6930, 546840, 3120613860, 7399357350, 10719893274090, 173761834256010, 14772517344885300 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) = A211890(n,k+1) - A211890(n,k), 0 <= k < n.
LINKS
Eric Weisstein's World of Mathematics, Prime Arithmetic Progression.
FORMULA
A010051(A000040(n) + k * a(n)) = 1, 0 <= k <= n.
PROG
(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
CROSSREFS
Sequence in context: A127517 A137825 A008341 * A174276 A117849 A328417
KEYWORD
nonn,more
AUTHOR
Reinhard Zumkeller, Jul 13 2012
EXTENSIONS
a(10) from Chai Wah Wu, Jun 29 2019
a(11)-a(13) from Giovanni Resta, Jun 30 2019
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 19 07:11 EDT 2024. Contains 371782 sequences. (Running on oeis4.)