[go: up one dir, main page]

login
A363501
a(n) = smallest product > n of some subset of the divisors of n, or if no product > n exists then a(n) = n.
1
1, 2, 3, 8, 5, 12, 7, 16, 27, 20, 11, 18, 13, 28, 45, 32, 17, 27, 19, 40, 63, 44, 23, 32, 125, 52, 81, 56, 29, 36, 31, 64, 99, 68, 175, 48, 37, 76, 117, 50, 41, 63, 43, 88, 75, 92, 47, 64, 343, 100, 153, 104, 53, 81, 275, 64, 171, 116, 59, 72, 61, 124, 147
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
Sequence in context: A296070 A060872 A162775 * A066959 A344368 A342768
KEYWORD
nonn
AUTHOR
Denis Ivanov, Jun 06 2023
STATUS
approved