How many natural numbers less than 200 will have 12 factors/divisors?
I know you guys love your maths (and I do too) but, for something as finite as this (i.e., not something that would consume years of compute time), you can test it with an exhaustive computer program, one that takes about three thousandths of a second on my desktop:
#include <stdio.h>
int main (int argc, char *argv[]) {
int quantN[200] = {0};
for (int number = 1; number < 200; number++) {
int quant = 0;
for (int divisor = 1; divisor <= number; divisor++)
if (number % divisor == 0)
quant++;
printf ("%3d: (%2d):", number, quant);
quantN[quant]++;
for (int divisor = 1; divisor <= number; divisor++)
if (number % divisor == 0)
printf (" %3d", divisor);
putchar ('\n');
}
putchar ('\n');
for (int quant = 0; quant < 200; quant++)
if (quantN[quant] > 0)
printf ("Quantity with %2d factors is %d\n",
quant, quantN[quant]);
return 0;
}
The relevant lines of that output are:
60: (12): 1 2 3 4 5 6 10 12 15 20 30 60
72: (12): 1 2 3 4 6 8 9 12 18 24 36 72
84: (12): 1 2 3 4 6 7 12 14 21 28 42 84
90: (12): 1 2 3 5 6 9 10 15 18 30 45 90
96: (12): 1 2 3 4 6 8 12 16 24 32 48 96
108: (12): 1 2 3 4 6 9 12 18 27 36 54 108
126: (12): 1 2 3 6 7 9 14 18 21 42 63 126
132: (12): 1 2 3 4 6 11 12 22 33 44 66 132
140: (12): 1 2 4 5 7 10 14 20 28 35 70 140
150: (12): 1 2 3 5 6 10 15 25 30 50 75 150
156: (12): 1 2 3 4 6 12 13 26 39 52 78 156
160: (12): 1 2 4 5 8 10 16 20 32 40 80 160
198: (12): 1 2 3 6 9 11 18 22 33 66 99 198
Quantity with 12 factors is 13
The complete output of that is shown below, and I'll ask in advance for forgiveness for butchering the English language with the phrase "Quantity with 1 factors is 1"
but I don't see the need for making the program grammatically aware for what is, in essence, a one-off activity.
Or you can just take that to mean I'm basically lazy :-)
1: ( 1): 1
2: ( 2): 1 2
3: ( 2): 1 3
4: ( 3): 1 2 4
5: ( 2): 1 5
6: ( 4): 1 2 3 6
7: ( 2): 1 7
8: ( 4): 1 2 4 8
9: ( 3): 1 3 9
10: ( 4): 1 2 5 10
11: ( 2): 1 11
12: ( 6): 1 2 3 4 6 12
13: ( 2): 1 13
14: ( 4): 1 2 7 14
15: ( 4): 1 3 5 15
16: ( 5): 1 2 4 8 16
17: ( 2): 1 17
18: ( 6): 1 2 3 6 9 18
19: ( 2): 1 19
20: ( 6): 1 2 4 5 10 20
21: ( 4): 1 3 7 21
22: ( 4): 1 2 11 22
23: ( 2): 1 23
24: ( 8): 1 2 3 4 6 8 12 24
25: ( 3): 1 5 25
26: ( 4): 1 2 13 26
27: ( 4): 1 3 9 27
28: ( 6): 1 2 4 7 14 28
29: ( 2): 1 29
30: ( 8): 1 2 3 5 6 10 15 30
31: ( 2): 1 31
32: ( 6): 1 2 4 8 16 32
33: ( 4): 1 3 11 33
34: ( 4): 1 2 17 34
35: ( 4): 1 5 7 35
36: ( 9): 1 2 3 4 6 9 12 18 36
37: ( 2): 1 37
38: ( 4): 1 2 19 38
39: ( 4): 1 3 13 39
40: ( 8): 1 2 4 5 8 10 20 40
41: ( 2): 1 41
42: ( 8): 1 2 3 6 7 14 21 42
43: ( 2): 1 43
44: ( 6): 1 2 4 11 22 44
45: ( 6): 1 3 5 9 15 45
46: ( 4): 1 2 23 46
47: ( 2): 1 47
48: (10): 1 2 3 4 6 8 12 16 24 48
49: ( 3): 1 7 49
50: ( 6): 1 2 5 10 25 50
51: ( 4): 1 3 17 51
52: ( 6): 1 2 4 13 26 52
53: ( 2): 1 53
54: ( 8): 1 2 3 6 9 18 27 54
55: ( 4): 1 5 11 55
56: ( 8): 1 2 4 7 8 14 28 56
57: ( 4): 1 3 19 57
58: ( 4): 1 2 29 58
59: ( 2): 1 59
60: (12): 1 2 3 4 5 6 10 12 15 20 30 60
61: ( 2): 1 61
62: ( 4): 1 2 31 62
63: ( 6): 1 3 7 9 21 63
64: ( 7): 1 2 4 8 16 32 64
65: ( 4): 1 5 13 65
66: ( 8): 1 2 3 6 11 22 33 66
67: ( 2): 1 67
68: ( 6): 1 2 4 17 34 68
69: ( 4): 1 3 23 69
70: ( 8): 1 2 5 7 10 14 35 70
71: ( 2): 1 71
72: (12): 1 2 3 4 6 8 9 12 18 24 36 72
73: ( 2): 1 73
74: ( 4): 1 2 37 74
75: ( 6): 1 3 5 15 25 75
76: ( 6): 1 2 4 19 38 76
77: ( 4): 1 7 11 77
78: ( 8): 1 2 3 6 13 26 39 78
79: ( 2): 1 79
80: (10): 1 2 4 5 8 10 16 20 40 80
81: ( 5): 1 3 9 27 81
82: ( 4): 1 2 41 82
83: ( 2): 1 83
84: (12): 1 2 3 4 6 7 12 14 21 28 42 84
85: ( 4): 1 5 17 85
86: ( 4): 1 2 43 86
87: ( 4): 1 3 29 87
88: ( 8): 1 2 4 8 11 22 44 88
89: ( 2): 1 89
90: (12): 1 2 3 5 6 9 10 15 18 30 45 90
91: ( 4): 1 7 13 91
92: ( 6): 1 2 4 23 46 92
93: ( 4): 1 3 31 93
94: ( 4): 1 2 47 94
95: ( 4): 1 5 19 95
96: (12): 1 2 3 4 6 8 12 16 24 32 48 96
97: ( 2): 1 97
98: ( 6): 1 2 7 14 49 98
99: ( 6): 1 3 9 11 33 99
100: ( 9): 1 2 4 5 10 20 25 50 100
101: ( 2): 1 101
102: ( 8): 1 2 3 6 17 34 51 102
103: ( 2): 1 103
104: ( 8): 1 2 4 8 13 26 52 104
105: ( 8): 1 3 5 7 15 21 35 105
106: ( 4): 1 2 53 106
107: ( 2): 1 107
108: (12): 1 2 3 4 6 9 12 18 27 36 54 108
109: ( 2): 1 109
110: ( 8): 1 2 5 10 11 22 55 110
111: ( 4): 1 3 37 111
112: (10): 1 2 4 7 8 14 16 28 56 112
113: ( 2): 1 113
114: ( 8): 1 2 3 6 19 38 57 114
115: ( 4): 1 5 23 115
116: ( 6): 1 2 4 29 58 116
117: ( 6): 1 3 9 13 39 117
118: ( 4): 1 2 59 118
119: ( 4): 1 7 17 119
120: (16): 1 2 3 4 5 6 8 10 12 15 20 24 30 40 60 120
121: ( 3): 1 11 121
122: ( 4): 1 2 61 122
123: ( 4): 1 3 41 123
124: ( 6): 1 2 4 31 62 124
125: ( 4): 1 5 25 125
126: (12): 1 2 3 6 7 9 14 18 21 42 63 126
127: ( 2): 1 127
128: ( 8): 1 2 4 8 16 32 64 128
129: ( 4): 1 3 43 129
130: ( 8): 1 2 5 10 13 26 65 130
131: ( 2): 1 131
132: (12): 1 2 3 4 6 11 12 22 33 44 66 132
133: ( 4): 1 7 19 133
134: ( 4): 1 2 67 134
135: ( 8): 1 3 5 9 15 27 45 135
136: ( 8): 1 2 4 8 17 34 68 136
137: ( 2): 1 137
138: ( 8): 1 2 3 6 23 46 69 138
139: ( 2): 1 139
140: (12): 1 2 4 5 7 10 14 20 28 35 70 140
141: ( 4): 1 3 47 141
142: ( 4): 1 2 71 142
143: ( 4): 1 11 13 143
144: (15): 1 2 3 4 6 8 9 12 16 18 24 36 48 72 144
145: ( 4): 1 5 29 145
146: ( 4): 1 2 73 146
147: ( 6): 1 3 7 21 49 147
148: ( 6): 1 2 4 37 74 148
149: ( 2): 1 149
150: (12): 1 2 3 5 6 10 15 25 30 50 75 150
151: ( 2): 1 151
152: ( 8): 1 2 4 8 19 38 76 152
153: ( 6): 1 3 9 17 51 153
154: ( 8): 1 2 7 11 14 22 77 154
155: ( 4): 1 5 31 155
156: (12): 1 2 3 4 6 12 13 26 39 52 78 156
157: ( 2): 1 157
158: ( 4): 1 2 79 158
159: ( 4): 1 3 53 159
160: (12): 1 2 4 5 8 10 16 20 32 40 80 160
161: ( 4): 1 7 23 161
162: (10): 1 2 3 6 9 18 27 54 81 162
163: ( 2): 1 163
164: ( 6): 1 2 4 41 82 164
165: ( 8): 1 3 5 11 15 33 55 165
166: ( 4): 1 2 83 166
167: ( 2): 1 167
168: (16): 1 2 3 4 6 7 8 12 14 21 24 28 42 56 84 168
169: ( 3): 1 13 169
170: ( 8): 1 2 5 10 17 34 85 170
171: ( 6): 1 3 9 19 57 171
172: ( 6): 1 2 4 43 86 172
173: ( 2): 1 173
174: ( 8): 1 2 3 6 29 58 87 174
175: ( 6): 1 5 7 25 35 175
176: (10): 1 2 4 8 11 16 22 44 88 176
177: ( 4): 1 3 59 177
178: ( 4): 1 2 89 178
179: ( 2): 1 179
180: (18): 1 2 3 4 5 6 9 10 12 15 18 20 30 36 45 60 90 180
181: ( 2): 1 181
182: ( 8): 1 2 7 13 14 26 91 182
183: ( 4): 1 3 61 183
184: ( 8): 1 2 4 8 23 46 92 184
185: ( 4): 1 5 37 185
186: ( 8): 1 2 3 6 31 62 93 186
187: ( 4): 1 11 17 187
188: ( 6): 1 2 4 47 94 188
189: ( 8): 1 3 7 9 21 27 63 189
190: ( 8): 1 2 5 10 19 38 95 190
191: ( 2): 1 191
192: (14): 1 2 3 4 6 8 12 16 24 32 48 64 96 192
193: ( 2): 1 193
194: ( 4): 1 2 97 194
195: ( 8): 1 3 5 13 15 39 65 195
196: ( 9): 1 2 4 7 14 28 49 98 196
197: ( 2): 1 197
198: (12): 1 2 3 6 9 11 18 22 33 66 99 198
199: ( 2): 1 199
Quantity with 1 factors is 1
Quantity with 2 factors is 46
Quantity with 3 factors is 6
Quantity with 4 factors is 59
Quantity with 5 factors is 2
Quantity with 6 factors is 27
Quantity with 7 factors is 1
Quantity with 8 factors is 31
Quantity with 9 factors is 3
Quantity with 10 factors is 5
Quantity with 12 factors is 13
Quantity with 14 factors is 1
Quantity with 15 factors is 1
Quantity with 16 factors is 2
Quantity with 18 factors is 1
I think you missed two possibilities: $108=2^2\cdot 3^3$ and $198=2\cdot 3^2\cdot 11$.
Hint: there are necessarily two factors $a,b$ with $\gcd(a,b) = 1$. Then using the fact that $\tau$ is multiplicative, you must have $\tau(a)\tau(b) = 12$ with $\min(\tau(a), \tau(b)) > 1$. This much simplifies the problem.