OFFSET
0,2
COMMENTS
Minimal k has the smallest n distinct prime factors: k = Product_{i = 1 .. n} prime(i)^e_i. Using any larger prime cannot reduce k, because the divisibility constraints force the other exponents to be at least as large as before, while the larger prime base makes the product no smaller. Choosing the minimal exponents e_i >= 1 that satisfy all (prime(i) + e_i) dividing k gives the minimal k.
LINKS
Felix Huber, Table of n, a(n) for n = 0..345
EXAMPLE
a(4) = 840 = 2^3*3^1*5^1*7^1 is the least k with exactly 4 distinct prime factors such that (2 + 3) = 5, (3 + 1) = 4, (5 + 1) = 6, and (7 + 1) = 8 all divide 840.
MAPLE
with(NumberTheory):
A390229 := proc(n) option remember;
local c, p, m, e, i, j, q, t, r, s;
if n = 0 then return 1 fi;
p := []; s := 2; while nops(p) < n do p := [op(p), s]; s := nextprime(s) end do;
m := table(); for i to n do m[p[i]] := i end do;
e := Array(1 .. n, 'fill = 1');
do
c := false;
for i to n do
do
q := p[i] + e[i];
t := ifactors(q)[2];
s := true;
for r in t do if r[1] > p[n] then s := false; break end if end do;
if not s then
e[i] := e[i] + 1; c := true; next
end if;
s := true;
for r in t do
j := m[r[1]];
if e[j] < r[2] then e[j] := r[2]; c := true; s := false end if
end do;
if s then break end if
end do
end do;
if not c then break end if
end do;
mul(p[i]^e[i], i = 1 .. n)
end proc:
seq(A390229(n), n = 0 .. 19);
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Huber, Feb 23 2026
STATUS
approved
