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!)
A061060 Write product of first n primes as x*y with x<y and x maximal; sequence gives value of y-x. 8
1, 1, 1, 1, 13, 17, 1, 41, 157, 1811, 1579, 18859, 95533, 17659, 1995293, 208303, 2396687, 58513111, 299808329, 2460653813, 3952306763, 341777053, 115405393057, 437621467859, 1009861675153, 6660853109087, 29075165225531 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

Needs longer b-file. - N. J. A. Sloane, Dec 18 2015

LINKS

Jud McCranie, Table of n, a(n) for n = 1..45

C. Aebi and G. Cairns, Partitions of primes, Parabola 45, Issue 1 (2009). - Jonathan Sondow, Jun 21 2012

Carlos Rivera, Minimal Primorial Partitions

EXAMPLE

a(4)=1: 2*3*5*7 = 210 = 14*15, so we can take x=14, y=15, with difference of 1.

Also: n=3: 2*3-5=1; n=4: 3*5-2*7=1; n=5: 5*11-2*3*7=13; n=6: 2*7*13-3*5*11=17; n=7: 5*11*13-2*3*7*17=1; n=8: 3*5*11*19-2*7*13*17=41

MAPLE

A061060aux := proc(l1, l2) local resul ; resul := product(l1[i], i=1..nops(l1)) ; resul := resul-product(l2[i], i=1..nops(l2)) ; RETURN(abs(resul)) ; end:

A061060 := proc(n) local plist, i, subl, resul, j, l1, l2, k, d ; plist := [] ; resul := 1 ; for i from 1 to n do resul := resul*ithprime(i) ; plist := [op(plist), ithprime(i)] ; od; for i from 1 to n/2 do subl := combinat[choose](plist, i) ; for j from 1 to nops(subl) do l1 := op(j, subl) ; l2 := convert(plist, set) minus convert(l1, set) ; d := A061060aux(l1, l2) ; if d < resul then resul := d ; fi ; od; od ; RETURN(resul) ; end:

for n from 3 to 19 do printf("%d, ", A061060(n)) ; od ; # R. J. Mathar, Aug 26 2006 [This Maple program was attached to A121315. However I think it belongs here, so I renamed the variables and moved it to this entry. - N. J. A. Sloane, Sep 16 2005]

MATHEMATICA

(* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) f[n_] := Block[{arrayofnprimes = Array[Prime, n], primorial = Times @@ Array[Prime, n], diffmin = Infinity, adiff, sub}, If[n == 1, 1, Do[sub = Times @@ NthSubset[i, arrayofnprimes]; adiff = Abs[primorial/sub - sub]; If[adiff < diffmin, diffmin = adiff], {i, 2, 2^n/2}]; diffmin]]; Do[ Print@f@n, {n, 30}] (* Robert G. Wilson v Sep 14 2006 *)

CROSSREFS

Cf. A061055-A061058, A60796, A061030-A061033.

Sequence in context: A029526 A219949 A173632 * A084307 A066918 A164062

Adjacent sequences:  A061057 A061058 A061059 * A061061 A061062 A061063

KEYWORD

nonn

AUTHOR

Ed Pegg Jr, May 28 2001

EXTENSIONS

Terms 16 through 37 (see b-file) computed by Jud McCranie, Apr 15 2000

Terms 38 through 45 (see b-file) by Jud McCranie, Jan 12 2016

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 February 26 12:33 EST 2020. Contains 332279 sequences. (Running on oeis4.)