login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

%I

%S 1,2,6,30,60,244230,6930,546840,3120613860,7399357350,10719893274090,

%T 173761834256010,14772517344885300

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

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

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimeArithmeticProgression.html">Prime Arithmetic Progression</a>.

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Primes_in_arithmetic_progression">Primes in arithmetic progression</a>.

%H <a href="/index/Pri#primes_AP">Index entries for sequences related to primes in arithmetic progressions</a>

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

%o (Haskell)

%o a211889 n = head [k | let p = a000040 n, k <- [1..],

%o all ((== 1) . a010051') $ map ((+ p) . (* k)) (a002260_row n)]

%o (Python)

%o from sympy import isprime, prime, primorial, primepi

%o def A211889(n):

%o if n == 1:

%o return 1

%o delta = primorial(primepi(n))

%o p, d = prime(n), delta

%o while True:

%o q = p

%o for _ in range(n):

%o q += d

%o if not isprime(q):

%o break

%o else:

%o return d

%o d += delta # _Chai Wah Wu_, Jun 28 2019

%Y Cf. A000040, A010051, A211890.

%K nonn,more

%O 1,2

%A _Reinhard Zumkeller_, Jul 13 2012

%E a(10) from _Chai Wah Wu_, Jun 29 2019

%E a(11)-a(13) from _Giovanni Resta_, Jun 30 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 09:52 EDT 2021. Contains 346273 sequences. (Running on oeis4.)