OFFSET
1,1
COMMENTS
A103622 lists the average values.
The parity of a(n) is different from the parity of n. - David A. Corneth, Mar 20 2018
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..30
FORMULA
a(1) = 2; 2/1 = 2;
a(2) = 15; (3+5)/2 = 4;
a(3) = 42; (2+3+7)/3 = 4;
a(4) = 1365; (3+5+7+13)/4 = 7;
a(5) = 2730; (2+3+5+7+13)/5 = 6.
MAPLE
with(combinat): P:=proc(q) local a, b, c, d, j, k, x; x:=[];
for j from 1 to q do x:=[op(x), ithprime(j)]; od; for j from 1 to q do
a:=choose(x, j); b:=10^40; d:=0;
for k from 1 to nops(a) do c:=convert(a[k], `+`)/j;
if frac(c)=0 and c<b then b:=c; d:=convert(a[k], `*`); fi; od;
print(d); od; end: P(30);
MATHEMATICA
f[n_] := If[n == 0, {1}, Block[{P = Product[Prime@ i, {i, n}], lim, k = 1, c, w = ConstantArray[1, n]}, lim = Prime[n + 1] P; {w}~Join~Reap[Do[w = If[k == 1, MapAt[# + 1 &, w, -k], Join[Drop[MapAt[# + 1 &, w, -k], -k + 1], ConstantArray[1, k - 1]]]; c = Times @@ Map[If[# == 0, 1, Prime@ #] &, Accumulate@ w]; If[c < lim, Sow[w]; k = 1, If[k == n, Break[], k++]], {i, Infinity}]][[-1, 1]]]]; Array[Min@ Map[Times @@ # &, Select[Map[Prime@ Accumulate@ # &, f@ #], IntegerQ@ Mean@ # &]] &, 14] (* Michael De Vlieger, Mar 19 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Mar 05 2018
STATUS
approved