OFFSET
1,2
COMMENTS
a(n) = n iff n=1 or n is prime.
For composite n, A363627(n) < n < a(n) and where both bounds are products of divisors of n and as tight as possible.
EXAMPLE
n = 4; divisors: [1,2,4]; subsets: [[], [1], [2], [4], [1, 2], [1, 4], [2, 4], [1, 2, 4]]; products: [1, 1, 2, 4, 2, 4, 8, 8]; minimal product that greater than 4 is 8, so a(4) = 8.
n = 5; divisors: [1,5]; subsets: [[], [1], [5], [1, 5]]; products: [1, 1, 5, 5]; no products greater than 5, so a(5) = 5.
MATHEMATICA
a[n_] := If[PrimeQ@n || n == 1, n,
First@Select[Union[Times @@@ Subsets[Divisors@n]], # > n &]];
PROG
(PARI) a(n) = my(d=divisors(n), nb = #d, m=oo); forsubset(nb, s, my(p=vecprod(vector(#s, k, d[s[k]]))); if (p>n, m=min(m, p))); if (m<oo, m, n); \\ Michel Marcus, Jun 17 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Denis Ivanov, Jun 06 2023
STATUS
approved