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!)
A036014 a(n) is the smallest number such that the product a(1)a(2)...a(n) falls between a twin prime pair, starting with a(1)=2. 1
2, 2, 3, 5, 3, 9, 6, 43, 18, 41, 82, 63, 47, 64, 108, 41, 192, 150, 91, 15, 5, 20, 214, 218, 46, 180, 121, 31, 80, 115, 39, 88, 2, 384, 1828, 1219, 360, 113, 2, 1111, 559, 687, 26, 1000, 368, 3130, 1198, 1731, 1752, 1240, 1237, 131, 814, 2349, 949, 64, 284, 361, 120, 3398, 47, 2068, 1001 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Michael De Vlieger, Table of n, a(n) for n = 1..150

EXAMPLE

4 between 3,5; 12 between 11,13; 60 between 59,61; etc.

MATHEMATICA

d[ 1 ]=2; d[ n_ ] := d[ n ]=Module[ {}, b=Product[ d[ i ], {i, 1, n-1} ]; i=2; While[ Not[ PrimeQ[ i b-1 ]&&PrimeQ[ i b+1 ] ], i++ ]; i ]; Table[ d[ i ], {i, 1, 30} ]

(* Second Program: *)

Nest[Append[#, Block[{k = 2}, While[! AllTrue[Times @@ #*k + {-1, 1}, PrimeQ], k++]; k]] &, {2}, 62] (* Michael De Vlieger, May 15 2018 *)

PROG

(J) ms =: [: */ ,

pp =: [: *./ 1: p: <: , >:

ty =: [: pp ms

a1 =: ($: >:)`, @.ty

2 (a1~^: 30) 2x NB. Stephen Makdisi, May 06 2018

(PARI) lista(nn) = {print1(a = 2, ", "); for (n=2, nn, k = 2; while (!(isprime(k*a-1) && isprime(k*a+1)), k++); print1(k, ", "); a *= k; ); } \\ Michel Marcus, May 06 2018

CROSSREFS

Cf. A014574 (average of twin primes pairs).

Sequence in context: A209167 A299995 A113167 * A289507 A076228 A317050

Adjacent sequences:  A036011 A036012 A036013 * A036015 A036016 A036017

KEYWORD

nonn,nice

AUTHOR

Russell Easterly

EXTENSIONS

More terms from Erich Friedman

Name edited by and more terms from Michel Marcus, May 06 2018

STATUS

approved

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 June 1 09:27 EDT 2020. Contains 334759 sequences. (Running on oeis4.)