A060795
Write product of first n primes as x*y with x
Original entry on oeis.org
1, 2, 5, 14, 42, 165, 714, 3094, 14858, 79534, 447051, 2714690, 17395070, 114371070, 783152070, 5708587335, 43848093003, 342444658094, 2803119896185, 23619540863730, 201813981102615, 1793779293633437, 16342050964565645, 154170926013430326, 1518409177581024365
Offset: 1
n = 8: q(8) = 2*3*5*7*11*13*17*19 = 9699690. Its 128th and 129th divisors are {3094, 3135}: a(8) = 3094 and 3094 < A000196(9699690) = 3114 < 3135. [Corrected by _Colin Barker_, Oct 22 2010]
2*3*5*7 = 210 = 14*15 with difference of 1, so a(4) = 14.
Cf.
A000196,
A060776,
A060777,
A061057,
A060796 (y),
A061060 (y-x),
A182987 (x+y),
A061030,
A061031,
A061032,
A061033,
A060755,
A033677,
A200743.
-
F:= proc(n) local P,N,M;
P:= {seq(ithprime(i),i=1..n)};
N:= floor(sqrt(convert(P,`*`)));
M:= map(convert, combinat:-powerset(P),`*`);
max(select(`<=`,M,N))
end proc:
map(F, [$1..20]); # Robert Israel, Feb 22 2016
-
a[n_] := (m = Times @@ Prime[Range[n]] ; dd = Divisors[m]; dd[[Length[dd]/2 // Floor]]); Table[Print[an = a[n]]; an, {n, 1, 25}] (* Jean-François Alcover, Oct 15 2016 *)
-
a(n) = my(m=prod(i=1, n, prime(i))); divisors(m)[numdiv(m)\2]; \\ Michel Marcus, Feb 22 2016
A061030
Factorial splitting: write n! = x*y*z with x
Original entry on oeis.org
1, 2, 4, 8, 15, 32, 64, 144, 330, 768, 1800, 4368, 10800, 27300, 70560, 184800, 494208, 1343680, 3704400, 10388250, 29560960, 85250880, 249318000, 738720000, 2216160000, 6729074352, 20675655000, 64247758848, 201820667904
Offset: 3
For n = 6, 6! = 720 = 8*9*10, so x=8, y=9, z=10.
- Luc Kumps, personal communication.
a(10) and a(11) corrected and a(14)-a(31) from
Donovan Johnson, May 11 2010
A200744
Divide integers 1..n into two sets, minimizing the difference of their products. This sequence is the larger product.
Original entry on oeis.org
1, 2, 3, 6, 12, 30, 72, 210, 630, 1920, 6336, 22176, 79200, 295680, 1146600, 4586400, 18869760, 80061696, 348986880, 1560176640, 7148445696, 33530112000, 160825785120, 787718131200, 3938590656000, 20083261440000, 104351247000000, 552173794099200, 2973528918360000, 16286983961149440
Offset: 1
For n=1, we put 1 in one set and the other is empty; with the standard convention for empty products, both products are 1.
For n=13, the central pair of divisors of n! are 78975 and 78848. Since neither is divisible by 10, these values cannot be obtained. The next pair of divisors are 79200 = 12*11*10*6*5*2*1 and 78624 = 13*9*8*7*4*3, so a(13) = 79200.
-
a:= proc(n) local l, ll, g, p, i; l:= [i$i=1..n]; ll:= [i!$i=1..n]; g:= proc(m, j, b) local mm, bb, k; if j=1 then m else mm:= m; bb:= b; for k to 2 while (mmbb then bb:= max(bb, g(mm, j-1, bb)) fi; mm:= mm*l[j] od; bb fi end; Digits:= 700; p:= ceil(sqrt(ll[n])); ll[n]/ g(1, nops(l), 1) end: seq(a(n), n=1..23); # Alois P. Heinz, Nov 22 2011
-
a[n_] := a[n] = Module[{s, t}, {s, t} = MinimalBy[{#, Complement[Range[n], #]}& /@ Subsets[Range[n]], Abs[Times @@ #[[1]] - Times @@ #[[2]]]&][[1]]; Max[Times @@ s, Times @@ t]];
Table[Print[n, " ", a[n]];
a[n], {n, 1, 25}] (* Jean-François Alcover, Nov 07 2020 *)
-
from math import prod, factorial
from itertools import combinations
def A200744(n):
m = factorial(n)
return min((abs((p:=prod(d))-m//p),max(p,m//p)) for l in range(n,n//2,-1) for d in combinations(range(1,n+1),l))[1] # Chai Wah Wu, Apr 07 2022
A061032
Factorial splitting: write n! = x*y*z with x
Original entry on oeis.org
3, 4, 6, 10, 21, 36, 81, 168, 360, 810, 1872, 4480, 11088, 27720, 71280, 186368, 496128, 1347192, 3720960, 10407936, 29576988, 85322160, 249500160, 738904320, 2216712960, 6732000000, 20680540160, 64260000000, 201860859375
Offset: 3
- Luc Kumps, personal communication.
a(10) and a(11) corrected and a(14)-a(31) from
Donovan Johnson, May 11 2010
Definition and a(14), a(18), a(24) are corrected by
Max Alekseyev, Apr 10 2022
A061031
Factorial splitting: write n! = x*y*z with x
Original entry on oeis.org
2, 3, 5, 9, 16, 35, 70, 150, 336, 770, 1848, 4455, 10920, 27648, 70720, 185895, 496125, 1344000, 3706560, 10395840, 29568000, 85299200, 249356800, 738840960, 2216522880, 6730407936, 20678434920, 64248260076, 201838500864
Offset: 3
- Luc Kumps, personal communication.
a(10) and a(11) corrected and a(14)-a(31) from
Donovan Johnson, May 11 2010
Definition and a(14), a(18), a(24) are corrected by
Max Alekseyev, Apr 10 2022
A038667
Minimal value of |product(A) - product(B)| where A and B are a partition of {1,2,3,...,n}.
Original entry on oeis.org
0, 0, 1, 1, 2, 2, 6, 2, 18, 54, 30, 36, 576, 576, 840, 6120, 24480, 20160, 93696, 420480, 800640, 1305696, 7983360, 80313120, 65318400, 326592000, 2286926400, 3002360256, 13680979200, 37744574400, 797369149440, 1763653953600, 16753029012720, 16880461678080, 10176199188480, 26657309952000
Offset: 0
For n=1, we put 1 in one set and the other is empty; with the standard convention for empty products, both products are 1.
For n=13, the central pair of divisors of n! are 78975 and 78848. Since neither is divisible by 10, these values cannot be obtained. The next pair of divisors are 79200 = 12*11*10*6*5*2*1 and 78624 = 13*9*8*7*4*3, so a(13) = 79200 - 78624 = 576.
-
a:= proc(n) local l, ll, g, gg, p, i; l:= [i$i=1..n]; ll:= [i!$i=1..n]; g:= proc(m, j, b) local mm, bb, k; if j=1 then m else mm:= m; bb:= b; for k to 2 while (mmbb then bb:= max(bb, g(mm, j-1, bb)) fi; mm:= mm*l[j] od; bb fi end; Digits:= 700; p:= ceil(sqrt(ll[n])); gg:= g(1, nops(l), 1); ll[n]/gg -gg end: a(0):=0:
seq(a(n), n=0..20); # Alois P. Heinz, Jul 09 2009, revised Oct 17 2015
-
a[n_] := Module[{l, ll, g, gg, p, i}, l = Range[n]; ll = Array[Factorial, n]; g[m_, j_, b_] := g[m, j, b] = Module[{mm, bb, k}, If[j==1, m, mm=m; bb=b; For[k=1, mm bb , bb = Max[bb, g[mm, j-1, bb]]]; mm = mm*l[[j]]]; bb]]; p = Ceiling[Sqrt[ ll[[n]]]]; gg = g[1, Length[l], 1]; ll[[n]]/gg - gg]; a[0]=0; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 35}] (* Jean-François Alcover, Feb 29 2016, after Alois P. Heinz *)
-
from math import prod, factorial
from itertools import combinations
def A038667(n):
m = factorial(n)
return 0 if n == 0 else min(abs((p:=prod(d))-m//p) for l in range(n,n//2,-1) for d in combinations(range(1,n+1),l)) # Chai Wah Wu, Apr 06 2022
A127180
a(n) = smallest possible (product of b(k)'s + product of c(k)'s), where the positive integers <= n are partitioned somehow into {b(k)} and {c(k)}.
Original entry on oeis.org
2, 2, 3, 5, 10, 22, 54, 142, 402, 1206, 3810, 12636, 43776, 157824, 590520, 2287080, 9148320, 37719360, 160029696, 697553280, 3119552640, 14295585696, 67052240640, 321571257120, 1575370944000, 7876854720000, 40164235953600
Offset: 0
By partitioning (1,2,3,...8) into {b(k)} and {c(k)} so that {b(k)} = (1,4,6,8) and {c(k)} = (2,3,5,7), then (product of b(k)'s + product of c(k)'s) is minimized. Therefore a(8) = 1*4*6*8 + 2*3*5*7 = 402.
-
LQprod := proc(S) if nops(S) = 0 then 1 ; else product(S[i],i=1..nops(S)) ; fi ; end: A127180 := proc(n) local S,m,B,b,c,s,res,i ; res := -1 ; S := {} ; for i from 1 to n do S := S union {i} ; od; for m from 0 to n/2 do B := combinat[permute](n,m) ; for i from 1 to nops(B) do b := op(i,B) ; c := S minus convert(b,set) ; s := LQprod(b)+LQprod(c) ; if res < 0 or s < res then res := s ; fi ; od ; od ; RETURN(res) ; end: for n from 1 to 20 do A127180(n) ; od ; # R. J. Mathar, Jan 10 2007
-
a[n_] := a[n] = Module[{s, t}, {s, t} = MinimalBy[{#, Complement[Range[n], #]}& /@ Subsets[Range[n]], Abs[Times @@ #[[1]] - Times @@ #[[2]]]&][[1]]; Times @@ s + Times @@ t];
Table[Print[n, " ", a[n]]; a[n], {n, 0, 24}] (* Jean-François Alcover, May 06 2023 *)
A355189
Factorial splitting: write n! = x*y*z with x <= y <= z and minimal z-x; sequence gives value of x.
Original entry on oeis.org
1, 1, 1, 1, 2, 4, 8, 14, 32, 70, 140, 324, 768, 1800, 4368, 10800, 27300, 70560, 184800, 494208, 1343680, 3704400, 10388250, 29560960, 85250880, 249318000, 738720000, 2216160000, 6729074352, 20675655000, 64245312000, 201819656500, 640760440320
Offset: 0
Cf.
A061030,
A061031,
A061032,
A061033,
A060776,
A060777,
A060795,
A060796,
A200743,
A200744,
A355190,
A355191,
A355192.
A355190
Factorial splitting: write n! = x*y*z with x <= y <= z and minimal z-x; sequence gives value of y.
Original entry on oeis.org
1, 1, 1, 2, 3, 5, 9, 18, 35, 72, 160, 350, 770, 1848, 4455, 10920, 27648, 70720, 185895, 496125, 1344000, 3706560, 10395840, 29568000, 85299200, 249356800, 738840960, 2216522880, 6730407936, 20678434920, 64253314125, 201847852800, 640813814784, 2055410286592, 6658705461408, 21780889600000
Offset: 0
Cf.
A061030,
A061031,
A061032,
A061033,
A060776,
A060777,
A060795,
A060796,
A200743,
A200744,
A355189,
A355191,
A355192.
A355191
Factorial splitting: write n! = x*y*z with x <= y <= z and minimal z-x; sequence gives value of z.
Original entry on oeis.org
1, 1, 2, 3, 4, 6, 10, 20, 36, 72, 162, 352, 810, 1872, 4480, 11088, 27720, 71280, 186368, 496128, 1347192, 3720960, 10407936, 29576988, 85322160, 249500160, 738904320, 2216712960, 6732000000, 20680540160, 64257392640, 201852518400, 640832000000, 2055425699250, 6658777165824, 21781337550336
Offset: 0
Cf.
A061030,
A061031,
A061032,
A061033,
A060776,
A060777,
A060795,
A060796,
A200743,
A200744,
A355189,
A355190,
A355192.
Showing 1-10 of 11 results.
Comments