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.

A061060 Write product of first n primes as x*y with x and x maximal; sequence gives value of y-x.

This page as a plain text file.
%I A061060 #59 Mar 08 2024 09:01:26
%S A061060 1,1,1,1,13,17,1,41,157,1811,1579,18859,95533,17659,1995293,208303,
%T A061060 2396687,58513111,299808329,2460653813,3952306763,341777053,
%U A061060 115405393057,437621467859,1009861675153,6660853109087,29075165225531
%N A061060 Write product of first n primes as x*y with x<y and x maximal; sequence gives value of y-x.
%H A061060 Max Alekseyev, <a href="/A061060/b061060.txt">Table of n, a(n) for n = 1..70</a>
%H A061060 C. Aebi and G. Cairns, <a href="http://www.parabola.unsw.edu.au/vol45_no1/vol45_no1_1.pdf">Partitions of primes</a>, Parabola 45, Issue 1 (2009). - _Jonathan Sondow_, Jun 21 2012
%H A061060 Carlos Rivera, <a href="http://www.primepuzzles.net/conjectures/conj_018.htm">Conjecture 18. Minimal Primorial Partitions</a>, The Prime Puzzles & Problems Connection.
%F A061060 Conjecture: Limit_{N->oo} (Sum_{n=1..N} log(a(n))) / (Sum_{n=1..N} prime(n)) = 1/e (A068985). - _Alain Rocchelli_, Nov 13 2023
%e A061060 a(4)=1: 2*3*5*7 = 210 = 14*15, so we can take x=14, y=15, with difference of 1.
%e A061060 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
%p A061060 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:
%p A061060 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:
%p A061060 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]
%t A061060 (* 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 *)
%Y A061060 Cf. A038667, A060776, A060777, A061057, A060795, A060796, A061030-A061033, A182987, A263292, A352813.
%K A061060 nonn
%O A061060 1,5
%A A061060 _Ed Pegg Jr_, May 28 2001
%E A061060 Terms a(16)-a(45) in b-file computed by _Jud McCranie_, Apr 15 2000; Jan 12 2016
%E A061060 a(46)-a(60) in b-file from _Don Reble_, Jul 11 2020
%E A061060 a(61)-a(70) in b-file from _Max Alekseyev_, Apr 20 2022