OFFSET
1,2
COMMENTS
It can be easily demonstrated that a(n) exists for all n and is less than or equal to 2^(n-1)*3 since 2^(n-1)*3 can be written in n different ways.
If n is a prime number then a(n) = 2^(n-1)*3, but there are also nonprime numbers n with this property (e.g., 9 and 14).
If n=k! then a(n) is the product of the first k prime numbers.
Finding the terms up to 2^64 was the focus of the 4th question of the ICPC coding challenge in 2013.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..136
The ACM-ICPC International Collegiate Programming Contest, ICPC 2013 problems
FORMULA
a(p) = 2^(p-1)*3 if p is a prime.
a(k!) = prime(k)# is the k-th primorial number. So for no m < k!, prime(k) | a(m). - David A. Corneth, May 24 2018
a(n) = min { k : A008480(k) = n }. - Alois P. Heinz, May 26 2018
EXAMPLE
a(1) = 1 because only a prime power or the empty product (which equals 1) can be written in just one way, and no prime power is smaller than 1.
a(2) = 6 = 3 * 2 = 2 * 3 because none of 3, 4, 5 can be written in two different ways.
a(3) = 12 = 3 * 2 * 2 = 2 * 3 * 2 = 2 * 2 * 3 (each of 7, 8, 9, 10, 11 can be written in at most 2 ways).
a(4) = 24 = 2 * 2 * 2 * 3 (each of 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 can be written in at most 3 ways).
MATHEMATICA
uv=Table[Length[Permutations[Join@@ConstantArray@@@FactorInteger[n]]], {n, 1, 1000}];
Table[Position[uv, k][[1, 1]], {k, Min@@Complement[Range[Max@@uv], uv]-1}] (* Gus Wiseman, Nov 22 2022 *)
PROG
(PARI) a008480(n) = my(f=factor(n)); sum(k=1, #f~, f[k, 2])!/prod(k=1, #f~, f[k, 2]!);
a(n) = {my(k=2); while (a008480(k) !=n, k++); k; } \\ Michel Marcus, May 23 2018
KEYWORD
nonn
AUTHOR
Vincent Champain, May 21 2018
STATUS
approved