A304938 a(n) is the smallest number which can be written in n different ways as an ordered product of prime factors.
1, 6, 12, 24, 48, 30, 192, 384, 768, 72, 3072, 60, 12288, 24576, 144, 98304, 196608, 393216, 786432, 120, 288, 6291456, 12582912, 210, 50331648, 100663296, 201326592, 576, 805306368, 180, 3221225472, 6442450944, 12884901888, 25769803776, 432, 1152, 206158430208, 412316860416, 824633720832, 1649267441664
Offset: 1
Keywords
Examples
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).
Links
- Amiram Eldar, Table of n, a(n) for n = 1..136
- The ACM-ICPC International Collegiate Programming Contest, ICPC 2013 problems
Crossrefs
Programs
-
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 *)
-
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
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
Comments