Discrete MathematicsDivisibility, Primes and Greatest Common Divisors4 of 6
Divisibility, Primes and Greatest Common Divisors · 4

Counting and Summing Divisors from Prime Factorizations

Listing divisors by trial division works for small numbers, but for larger numbers we need a way to count and add every positive divisor directly from the prime factorization.

1

Counting Divisors with Prime Menus

We want to find how many positive divisors a number like 7272 or 720720 has without listing them all out. From the Fundamental Theorem of Arithmetic, every positive integer breaks down into a unique bag of prime bricks, so any divisor dd in d×k=72d \times k = 72 is formed by pulling a sub-collection of bricks out of the bag while the leftover bricks automatically form the partner factor kk.

72=23⋅3272 = \ptwo{2^3} \cdot \pthree{3^2}
2\ptwo{2}
2\ptwo{2}
2\ptwo{2}
3\pthree{3}
3\pthree{3}
2\ptwo{2}
2\ptwo{2}
3\pthree{3}
2\ptwo{2}
3\pthree{3}
d=12d = 12
k=6k = 6
d×k=12×6=72d \times k = 12 \times 6 = 72
Counting Divisors with Prime Menus
7272
8\ptwo{8}
9\pthree{9}
2\ptwo{2}
2\ptwo{2}
2\ptwo{2}
3\pthree{3}
3\pthree{3}
72=23⋅3272 = \ptwo{2^3} \cdot \pthree{3^2}
Count=?\total{\text{Count}} = {?}
Text solution
Factor the number into prime powersBreak 7272 and 720720 down into their prime building blocks so we can see how many bricks of each prime are in the bag.
72=8×9=23⋅32720=72×10=24⋅32⋅51\displaystyle \begin{aligned} 72 &= \ptwo{8} \times \pthree{9} = \ptwo{2^3} \cdot \pthree{3^2} \\ 720 &= 72 \times 10 = \ptwo{2^4} \cdot \pthree{3^2} \cdot \pfive{5^1} \end{aligned}
Add 11 to each exponent for the "take zero" optionA divisor can use anywhere from 00 up to the maximum available copies of each prime, where taking zero copies of pp is written as p0=1p^0 = 1 (it contributes a factor of 11, not 00, to the divisor).
For 72=23⋅32:20,21,22,23⏟3+1=4 choices,30,31,32⏟2+1=3 choicesFor 720=24⋅32⋅51:4+1⏟5 choices for 2,2+1⏟3 choices for 3,1+1⏟2 choices for 5\displaystyle \begin{aligned} &\text{For } 72 = \ptwo{2^3} \cdot \pthree{3^2}: \\ &\underbrace{\ptwo{2^0, 2^1, 2^2, 2^3}}_{\ptwo{3} + 1 = \ptwo{4}\text{ choices}}, \quad \underbrace{\pthree{3^0, 3^1, 3^2}}_{\pthree{2} + 1 = \pthree{3}\text{ choices}} \\ &\text{For } 720 = \ptwo{2^4} \cdot \pthree{3^2} \cdot \pfive{5^1}: \\ &\underbrace{\ptwo{4} + 1}_{\ptwo{5}\text{ choices for }\ptwo{2}}, \underbrace{\pthree{2} + 1}_{\pthree{3}\text{ choices for }\pthree{3}}, \underbrace{\pfive{1} + 1}_{\pfive{2}\text{ choices for }\pfive{5}} \end{aligned}
Multiply the menu sizesBecause prime factorizations are unique, every combination of menu choices produces a different divisor.
Divisors of 72=4×3=12Divisors of 720=5×3×2=30\displaystyle \begin{aligned} \text{Divisors of } 72 &= \ptwo{4} \times \pthree{3} = \total{12} \\ \text{Divisors of } 720 &= \ptwo{5} \times \pthree{3} \times \pfive{2} = \total{30} \end{aligned}

So 7272 has 12\total{12} positive divisors and 720720 has 30\total{30} positive divisors, found without listing a single divisor.

In the card below, every sub-collection of prime bricks pulled from the bag of 72=23⋅3272 = \ptwo{2^3} \cdot \pthree{3^2} lights up a unique (2a,3b)(\ptwo{2^a}, \pthree{3^b}) cell in the 4×3\ptwo{4} \times \pthree{3} menu grid, while the bricks left behind in the bag multiply to form the partner factor kk in d×k=72d \times k = 72.

Each choice of prime bricks you pull from the bag lands on its own box in the grid, while the bricks left behind multiply to make the partner factor.
2

Counting Divisors with Conditions

Suppose we only want to count the divisors of 720720 that satisfy a condition, such as being even, odd, a perfect square, or a perfect cube. Instead of testing all 30\total{30} divisors one by one, we can filter the prime menus before multiplying their sizes.

Counting Divisors with Conditions
How many divisors of 720 are even?\text{How many divisors of } 720 \text{ are even?}
720=720 =
24\ptwo{2^4}
⋅\cdot
32\pthree{3^2}
⋅\cdot
51\pfive{5^1}
20\ptwo{2^0}
21\ptwo{2^1}
22\ptwo{2^2}
23\ptwo{2^3}
24\ptwo{2^4}
30\pthree{3^0}
31\pthree{3^1}
32\pthree{3^2}
50\pfive{5^0}
51\pfive{5^1}
Text solution
Write out the full prime menus for 720720Start with all available powers for each prime in 720=24⋅32⋅51720 = \ptwo{2^4} \cdot \pthree{3^2} \cdot \pfive{5^1}.
Menu for 2:20,21,22,23,24Menu for 3:30,31,32Menu for 5:50,51\displaystyle \begin{aligned} \text{Menu for } \ptwo{2}&: \quad \ptwo{2^0, 2^1, 2^2, 2^3, 2^4} \\ \text{Menu for } \pthree{3}&: \quad \pthree{3^0, 3^1, 3^2} \\ \text{Menu for } \pfive{5}&: \quad \pfive{5^0, 5^1} \end{aligned}
Cross off disallowed powers for even or odd divisorsAn even divisor needs at least one 2\ptwo{2} (which removes 20\fails{2^0}), while an odd divisor cannot use any 2\ptwo{2}s (which leaves only 20\ptwo{2^0}).
Even divisors: 4⏟keep 21,22,23,24×3×2=24Odd divisors: 1⏟keep only 20×3×2=6\displaystyle \begin{aligned} &\text{Even divisors: } \\ &\quad \underbrace{\ptwo{4}}_{\text{keep } \ptwo{2^1, 2^2, 2^3, 2^4}} \times \pthree{3} \times \pfive{2} = \total{24} \\ &\text{Odd divisors: } \\ &\quad \underbrace{\ptwo{1}}_{\text{keep only } \ptwo{2^0}} \times \pthree{3} \times \pfive{2} = \total{6} \end{aligned}
Keep only even exponents for perfect squaresA perfect square n×nn \times n splits its prime bricks into two identical piles, which means every prime exponent must be even (0,2,4,…0, 2, 4, \dots).
Square divisors: 3⏟keep 20,22,24×2⏟keep 30,32×1⏟keep 50=6\displaystyle \begin{aligned} &\text{Square divisors: } \\ &\quad \underbrace{\ptwo{3}}_{\text{keep } \ptwo{2^0, 2^2, 2^4}} \times \underbrace{\pthree{2}}_{\text{keep } \pthree{3^0, 3^2}} \times \underbrace{\pfive{1}}_{\text{keep } \pfive{5^0}} = \total{6} \end{aligned}
Keep only multiples of 33 in the exponents for perfect cubesA perfect cube n×n×nn \times n \times n splits its bricks into three identical piles, so every prime exponent must be a multiple of 33 (0,3,6,…0, 3, 6, \dots).
Cube divisors: 2⏟keep 20,23×1⏟keep 30×1⏟keep 50=2\displaystyle \begin{aligned} &\text{Cube divisors: } \\ &\quad \underbrace{\ptwo{2}}_{\text{keep } \ptwo{2^0, 2^3}} \times \underbrace{\pthree{1}}_{\text{keep } \pthree{3^0}} \times \underbrace{\pfive{1}}_{\text{keep } \pfive{5^0}} = \total{2} \end{aligned}

So out of the 30\total{30} divisors of 720720, 24\total{24} are even, 6\total{6} are odd, 6\total{6} are perfect squares, and 2\total{2} are perfect cubes (11 and 88).

Watch out for primes that appear only to the first power, like 51\pfive{5^1} in 720720: since 00 is both an even number and a multiple of 33, the choice 50=1\pfive{5^0} = \pfive{1} stays on the menu, giving 1\pfive{1} choice for 5\pfive{5} rather than 0\fails{0}.

In this card, crossing options off the prime menus for 720720 dims out every divisor in the table that uses a forbidden prime power, while the count of remaining divisors always equals the product of the remaining menu lengths.

Crossing powers off the prime menus of 720720 filters its divisors, and the number of divisors left is always the product of the remaining menu lengths.
3

Working Backward from the Divisor Count

Now let's reverse the question: instead of starting with a number and counting its divisors, we want to start with a divisor count, such as having an odd number of divisors or having exactly 6\total{6} divisors, and find what the number's prime factorization must look like.

Working Backward from the Divisor Count
72:12 divisors\mathllap{72\hspace{0.3em}}:\hspace{0.3em}\total{12} \text{ divisors}
720:30 divisors\mathllap{720\hspace{0.3em}}:\hspace{0.3em}\total{30} \text{ divisors}
n=?:odd divisor count\mathllap{n = {?}\hspace{0.3em}}:\hspace{0.3em}\total{\text{odd divisor count}}
smallest n=?:6 divisors\mathllap{\text{smallest } n = {?}\hspace{0.3em}}:\hspace{0.3em}\total{6} \text{ divisors}
Text solution
Check when the product of menu sizes is oddA product of whole numbers is odd if and only if every factor (ai+1)(a_i + 1) is odd, which forces every prime exponent aia_i to be even.
Odd divisor count  ⟺  every (ai+1) is odd  ⟺  every ai is even  ⟺  perfect square\displaystyle \begin{aligned} &\total{\text{Odd divisor count}} \\ \iff &\text{every } (a_i + 1) \text{ is odd} \\ \iff &\text{every } a_i \text{ is even} \\ \iff &\text{perfect square} \end{aligned}
Factor the target count 6\total{6} into menu sizes greater than 11To find the smallest positive integer with 6\total{6} divisors, write every way 6\total{6} can be expressed as a product of menu sizes, then subtract 11 from each menu size to find the prime exponents.
One menu of size 6:a1=6−1=5  ⟹  p15Two menus of sizes 3×2:a1=3−1=2,a2=2−1=1  ⟹  p12⋅p21\displaystyle \begin{aligned} &\text{One menu of size } \total{6}: \\ &\quad a_1 = \total{6} - 1 = 5 \implies p_1^5 \\ &\text{Two menus of sizes } \total{3} \times \total{2}: \\ &\quad a_1 = \total{3} - 1 = 2, \\ &\quad a_2 = \total{2} - 1 = 1 \implies p_1^2 \cdot p_2^1 \end{aligned}
Put the smallest primes on the largest exponents and compareChoosing 2,3,…\ptwo{2}, \pthree{3}, \dots for the primes makes each candidate as small as possible.
Candidate 1: 25=32Candidate 2: 22⋅31=4×3=12\displaystyle \begin{aligned} \text{Candidate 1: } &\ptwo{2^5} = 32 \\ \text{Candidate 2: } &\ptwo{2^2} \cdot \pthree{3^1} = \ptwo{4} \times \pthree{3} = 12 \end{aligned}

Comparing the two candidates shows that 1212 is the smallest positive integer with exactly 6\total{6} divisors.

4

Summing Divisors from Prime Menus

Next, we want to find the sum of all positive divisors of a number like 7272, 720720, or 28⋅35\ptwo{2^8} \cdot \pthree{3^5} without listing the divisors first. Looking at the divisor grid for 7272, each row has a common power of 2\ptwo{2} that can be factored out in front of (1+3+9)\pthree{(1 + 3 + 9)}.

×\htmlClass{lc-mute}{\times}
1\pthree{1}
3\pthree{3}
9\pthree{9}
1\ptwo{1}
11
33
99
1(1+3+9)\mathllap{\ptwo{1}}\pthree{(1 + 3 + 9)}
2\ptwo{2}
22
66
1818
+2(1+3+9)\mathllap{+\quad\ptwo{2}}\pthree{(1 + 3 + 9)}
4\ptwo{4}
44
1212
3636
+4(1+3+9)\mathllap{+\quad\ptwo{4}}\pthree{(1 + 3 + 9)}
8\ptwo{8}
88
2424
7272
+8(1+3+9)\mathllap{+\quad\ptwo{8}}\pthree{(1 + 3 + 9)}
(1+2+4+8)(1+3+9)\mathllap{\ptwo{(1 + 2 + 4 + 8)}}\pthree{(1 + 3 + 9)}

When a prime has a large exponent, adding its menu by hand takes too long, so we use the geometric sum formula to add the menu in one step:

1+p+p2+⋯+pa\displaystyle 1 + p + p^2 + \dots + p^a =pa+1−1p−1\displaystyle = \frac{p^{a+1} - 1}{p - 1}
Summing Divisors from Prime Menus
1+2+3+4+6+⋯+72=?1 + 2 + 3 + 4 + 6 + \cdots + 72 = {?}
72=23⋅3272 = \ptwo{2^3} \cdot \pthree{3^2}
×\htmlClass{lc-mute}{\times}
1\pthree{1}
3\pthree{3}
9\pthree{9}
1\ptwo{1}
11
33
99
2\ptwo{2}
22
66
1818
4\ptwo{4}
44
1212
3636
8\ptwo{8}
88
2424
7272
Text solution
Add each prime's menu and multiply the sumsFor small exponents like those in 72=23⋅3272 = \ptwo{2^3} \cdot \pthree{3^2} and 720=24⋅32⋅51720 = \ptwo{2^4} \cdot \pthree{3^2} \cdot \pfive{5^1}, we can add the powers on each menu directly and multiply the sums together.
Sum for 72=(1+2+4+8)⏟15×(1+3+9)⏟13=15×13=195Sum for 720=(1+2+4+8+16)⏟31×(1+3+9)⏟13×(1+5)⏟6=31×13×6=2,418\displaystyle \begin{aligned} &\text{Sum for } 72 \\ &= \underbrace{\ptwo{(1 + 2 + 4 + 8)}}_{\ptwo{15}} \times \underbrace{\pthree{(1 + 3 + 9)}}_{\pthree{13}} \\ &= \ptwo{15} \times \pthree{13} = \total{195} \\ &\text{Sum for } 720 \\ &= \underbrace{\ptwo{(1 + 2 + 4 + 8 + 16)}}_{\ptwo{31}} \\ &\quad \times \underbrace{\pthree{(1 + 3 + 9)}}_{\pthree{13}} \times \underbrace{\pfive{(1 + 5)}}_{\pfive{6}} \\ &= \ptwo{31} \times \pthree{13} \times \pfive{6} = \total{2{,}418} \end{aligned}
Use the geometric sum shortcut for large exponentsFor 28⋅35\ptwo{2^8} \cdot \pthree{3^5}, take the next power of each prime, subtract 11, and divide by p−1p - 1.
Sum of 2s menu=1+2+⋯+28=29−12−1=512−1=511Sum of 3s menu=1+3+⋯+35=36−13−1=729−12=7282=364Sum for 28⋅35=511×364=186,004\displaystyle \begin{aligned} &\text{Sum of } \ptwo{2}\text{s menu} \\ &= \ptwo{1 + 2 + \dots + 2^8} \\ &= \frac{\ptwo{2^9} - 1}{2 - 1} = 512 - 1 = \ptwo{511} \\ &\text{Sum of } \pthree{3}\text{s menu} \\ &= \pthree{1 + 3 + \dots + 3^5} = \frac{\pthree{3^6} - 1}{3 - 1} \\ &= \frac{729 - 1}{2} = \frac{728}{2} = \pthree{364} \\ &\text{Sum for } \ptwo{2^8} \cdot \pthree{3^5} \\ &= \ptwo{511} \times \pthree{364} = \total{186{,}004} \end{aligned}

So the 12\total{12} divisors of 7272 add up to 195\total{195}, the 30\total{30} divisors of 720720 add up to 2,418\total{2{,}418}, and the divisors of 28⋅35\ptwo{2^8} \cdot \pthree{3^5} add up to 186,004\total{186{,}004}.

For any positive integer written in its prime factorization n=p1a1p2a2⋯pkakn = p_1^{a_1} p_2^{a_2} \cdots p_k^{a_k}, the general divisor count and divisor sum formulas write out these two menu steps:

Count=(a1+1)(a2+1)⋯(ak+1),Sum=∏i=1kpiai+1−1pi−1\displaystyle \begin{aligned} \total{\text{Count}} &= (a_1 + 1)(a_2 + 1)\cdots(a_k + 1), \\ \total{\text{Sum}} &= \prod_{i=1}^k \frac{p_i^{a_i + 1} - 1}{p_i - 1} \end{aligned}

Here the symbol ∏\prod means we multiply the terms together across all primes p1,…,pkp_1, \dots, p_k, just as ∑\sum means we add terms together.

Key concepts

Every divisor problem starts by factoring n=p1a1p2a2⋯pkakn = p_1^{a_1} p_2^{a_2} \cdots p_k^{a_k} into its prime menus 11, pip_i, pi2p_i^2, …\dots, piaip_i^{a_i}:

Counting all divisors (add 11 to each exponent and multiply)

Each prime power piaip_i^{a_i} gives ai+1a_i + 1 choices once we include pi0=1p_i^0 = 1. For 72=23⋅3272 = \ptwo{2^3} \cdot \pthree{3^2}, the count is (3+1)(2+1)=12(\ptwo{3} + 1)(\pthree{2} + 1) = \total{12}.

Counting or summing with conditions (filter the menus first)

Cross off disallowed powers on each menu before counting or adding the remaining options. For even divisors of 7272, cross off 20\fails{2^0} to leave 3×3=9\ptwo{3} \times \pthree{3} = \total{9} divisors with sum (2+4+8)(1+3+9)\ptwo{(2 + 4 + 8)}\pthree{(1 + 3 + 9)} =14×13= \ptwo{14} \times \pthree{13} =182= \total{182}; for perfect squares, keep only even exponents (0,2,4,…0, 2, 4, \dots).

Working backward from the count (factor the count into menu sizes)

An odd divisor count happens if and only if nn is a perfect square. To find the smallest number with a given divisor count, check every way to factor the count into menu sizes greater than 11 (don't stop at two primes if the count factors into three, like 12=3×2×2\total{12} = \total{3} \times \total{2} \times \total{2} for 22⋅31⋅51=60\ptwo{2^2} \cdot \pthree{3^1} \cdot \pfive{5^1} = 60) and put the largest exponents on the smallest primes.

Summing divisors (add each menu, then multiply)

Multiply the sums of the menus using pa+1−1p−1\frac{p^{a+1} - 1}{p - 1} when exponents are large (for p=2p = \ptwo{2}, the denominator is 11, so 1+2+⋯+2a\ptwo{1 + 2 + \dots + 2^a} is just 2a+1−1\ptwo{2^{a+1}} - 1). When an exponent is small (like 32\pthree{3^2} or 51\pfive{5^1}) or when a condition crosses powers off a menu, don't use the geometric sum fraction: just add the remaining powers directly, like 1+3+9=13\pthree{1 + 3 + 9} = \pthree{13}.

5

Practice

1

How many positive divisors does 1,8001{,}800 have?

Factor 1,8001{,}800 as 18×10018 \times 100 first, collect the powers of each prime, and remember the "take zero" option on each menu.

Factoring 1,8001{,}800 into primes gives:
1,800=18×100=(2⋅32)×(22⋅52)=23⋅32⋅52\displaystyle \begin{aligned} 1{,}800 &= 18 \times 100 \\ &= (\ptwo{2} \cdot \pthree{3^2}) \times (\ptwo{2^2} \cdot \pfive{5^2}) \\ &= \ptwo{2^3} \cdot \pthree{3^2} \cdot \pfive{5^2} \end{aligned}
Be careful not to multiply the exponents directly as 3×2×2=123 \times 2 \times 2 = \fails{12}; forgetting to add 11 for the p0=1p^0 = 1 option on each menu leaves out the "take zero" choices. Adding 11 to each exponent gives the menu sizes:
(3+1)(2+1)(2+1)=4×3×3=36\displaystyle \begin{aligned} (\ptwo{3} + 1)(\pthree{2} + 1)(\pfive{2} + 1) &= \ptwo{4} \times \pthree{3} \times \pfive{3} \\ &= \total{36} \end{aligned}
2

How many positive divisors of 3,6003{,}600 are multiples of 1212?

Break both 3,6003{,}600 and 1212 into primes: what is the minimum number of 2\ptwo{2}s and 3\pthree{3}s a divisor must take from the menus of 3,6003{,}600 to be a multiple of 1212?

Factoring both numbers into primes gives 3,600=24⋅32⋅523{,}600 = \ptwo{2^4} \cdot \pthree{3^2} \cdot \pfive{5^2} and 12=22⋅3112 = \ptwo{2^2} \cdot \pthree{3^1}. A divisor of 3,6003{,}600 is a multiple of 1212 if and only if it takes at least two 2\ptwo{2}s and at least one 3\pthree{3}:
Menu for 2\ptwo{2}: cross off 20,21\fails{2^0, 2^1} to keep 22,23,24\ptwo{2^2, 2^3, 2^4} (3\ptwo{3} choices).
Menu for 3\pthree{3}: cross off 30\fails{3^0} to keep 31,32\pthree{3^1, 3^2} (2\pthree{2} choices).
Menu for 5\pfive{5}: no restriction, so keep 50,51,52\pfive{5^0, 5^1, 5^2} (3\pfive{3} choices).
Watch out for subtracting exponents directly (4−2=24 - 2 = 2 and 2−1=12 - 1 = 1, which gives 2×1×3=62 \times 1 \times 3 = \fails{6}) or forgetting 50\pfive{5^0} (which gives 3×2×2=123 \times 2 \times 2 = \fails{12}); counting the remaining powers on each menu gives:
3×2×3\displaystyle \ptwo{3} \times \pthree{2} \times \pfive{3} =18\displaystyle = \total{18}
3

For n=27⋅34⋅56⋅7n = \ptwo{2^7} \cdot \pthree{3^4} \cdot \pfive{5^6} \cdot 7, how many of its positive divisors are perfect squares, and how many are perfect cubes?

Write out the allowed exponents (0,2,4,…0, 2, 4, \dots for squares; 0,3,6,…0, 3, 6, \dots for cubes) for each of the four primes, including 717^1.

Write n=27⋅34⋅56⋅71n = \ptwo{2^7} \cdot \pthree{3^4} \cdot \pfive{5^6} \cdot 7^1. Don't look at 717^1 and conclude there are 0\fails{0} choices for 77 (which would make the product 0\fails{0}), and don't forget to include the exponent 00 on the other primes (which would give 3×2×3×1=183 \times 2 \times 3 \times 1 = \fails{18} for squares and 2×1×2×1=42 \times 1 \times 2 \times 1 = \fails{4} for cubes): 70=17^0 = 1 has exponent 00, which is both even and a multiple of 33.
For perfect squares (even exponents): 2\ptwo{2} has 4\ptwo{4} choices (0,2,4,60, 2, 4, 6), 3\pthree{3} has 3\pthree{3} choices (0,2,40, 2, 4), 5\pfive{5} has 4\pfive{4} choices (0,2,4,60, 2, 4, 6), and 77 has 11 choice (00):
4×3×4×1\displaystyle \ptwo{4} \times \pthree{3} \times \pfive{4} \times 1 =48\displaystyle = \total{48}
For perfect cubes (exponents that are multiples of 33): 2\ptwo{2} has 3\ptwo{3} choices (0,3,60, 3, 6), 3\pthree{3} has 2\pthree{2} choices (0,30, 3), 5\pfive{5} has 3\pfive{3} choices (0,3,60, 3, 6), and 77 has 11 choice (00):
3×2×3×1\displaystyle \ptwo{3} \times \pthree{2} \times \pfive{3} \times 1 =18\displaystyle = \total{18}
This gives 48\total{48} perfect squares and 18\total{18} perfect cubes.
4

How many positive integers from 11 to 200200 inclusive have an odd number of positive divisors, and how many have exactly 3\total{3} positive divisors?

Use the rule for which numbers have an odd divisor count first; then check how many ways the menu product can equal 3\total{3}.

A positive integer has an odd number of divisors if and only if it is a perfect square. Since 142=196≤200<225=15214^2 = 196 \le 200 < 225 = 15^2, there are 14\total{14} such integers (12,22,…,1421^2, 2^2, \dots, 14^2).
For a number to have exactly 3\total{3} divisors, its menu sizes must multiply to 3\total{3}. Because 33 is prime, there is only one prime menu of size 3\total{3}, so the number must have the form p2p^2 for a prime pp. Be careful not to count all 1414 squares (for instance, 12=11^2 = 1 has 1\total{1} divisor and 42=16=244^2 = 16 = \ptwo{2^4} has 5\total{5} divisors); only prime bases p≤14p \le 14 work, which are 2,3,5,7,11,132, 3, 5, 7, 11, 13 (giving 4,9,25,49,121,1694, 9, 25, 49, 121, 169). This gives 14\total{14} integers with an odd number of divisors and 6\total{6} with exactly 3\total{3} divisors.
5

What is the smallest positive integer that has exactly 12\total{12} positive divisors?

List all four ways to factor 12\total{12} into menu sizes greater than 11 (with one, two, or three prime menus) before comparing the resulting numbers.

Factor the divisor count 12\total{12} into menu sizes greater than 11 in every possible way, subtract 11 from each menu size to get the exponents, and put the largest exponents on the smallest primes:
Menu size 12\total{12}: exponent 1111   ⟹  \implies 211=2,048\ptwo{2^{11}} = 2{,}048.
Menu sizes 6×2\total{6} \times \total{2}: exponents 5,15, 1   ⟹  \implies 25⋅31=96\ptwo{2^5} \cdot \pthree{3^1} = 96.
Menu sizes 4×3\total{4} \times \total{3}: exponents 3,23, 2   ⟹  \implies 23⋅32=72\ptwo{2^3} \cdot \pthree{3^2} = 72.
Menu sizes 3×2×2\total{3} \times \total{2} \times \total{2}: exponents 2,1,12, 1, 1   ⟹  \implies 22⋅31⋅51=60\ptwo{2^2} \cdot \pthree{3^1} \cdot \pfive{5^1} = 60.
A common slip is stopping after two-prime factorizations at 23⋅32=72\ptwo{2^3} \cdot \pthree{3^2} = 72 and overlooking the three-prime split 3×2×2\total{3} \times \total{2} \times \total{2}. Comparing all four candidates gives 6060.
6

Find the sum of all positive divisors of 8,0008{,}000.

Factor 8,000=8×1,0008{,}000 = 8 \times 1{,}000 into powers of 2\ptwo{2} and 5\pfive{5}, then apply the geometric sum shortcut to each prime menu.

Factoring 8,0008{,}000 gives 8,000=8×1,000=26⋅538{,}000 = 8 \times 1{,}000 = \ptwo{2^6} \cdot \pfive{5^3}. Using the geometric sum formula on each menu:
Sum of 2s menu=26+1−1=27−1=127Sum of 5s menu=53+1−15−1=625−14=6244=156\displaystyle \begin{aligned} &\text{Sum of } \ptwo{2}\text{s menu} \\ &= \ptwo{2^{6+1}} - 1 = \ptwo{2^7} - 1 = \ptwo{127} \\ &\text{Sum of } \pfive{5}\text{s menu} \\ &= \frac{\pfive{5^{3+1}} - 1}{5 - 1} \\ &= \frac{625 - 1}{4} = \frac{624}{4} = \pfive{156} \end{aligned}
Watch out for two common slips here: forgetting to raise the exponent by 11 in the numerator (which gives (26−1)(53−1)4=63×31=1,953\tfrac{(2^6 - 1)(5^3 - 1)}{4} = 63 \times 31 = \fails{1{,}953}) or forgetting to divide 54−1=6245^4 - 1 = 624 by 5−1=45 - 1 = 4 (which gives 127×624=79,248127 \times 624 = \fails{79{,}248}). Multiplying the two menu sums gives:
127×156\displaystyle \ptwo{127} \times \pfive{156} =19,812\displaystyle = \total{19{,}812}
7

Find the sum of all even positive divisors of 360360.

Factor 360360, cross off the one option on the 2\ptwo{2}s menu that makes a divisor odd, and add the remaining powers on each menu.

Factoring 360360 gives 360=23⋅32⋅51360 = \ptwo{2^3} \cdot \pthree{3^2} \cdot \pfive{5^1}. An even divisor must use at least one 2\ptwo{2}, so we cross 20=1\fails{2^0} = \fails{1} off the 2\ptwo{2}s menu. Be careful not to use the full 2\ptwo{2}s menu sum 24−1=15\ptwo{2^4} - 1 = 15 by mistake, which includes the odd divisors and gives 15×13×6=1,17015 \times 13 \times 6 = \fails{1{,}170}. Adding the remaining options on each menu and multiplying gives:
(2+4+8)(1+3+9)(1+5)=14×13×6=1,092\displaystyle \begin{aligned} &\ptwo{(2 + 4 + 8)}\pthree{(1 + 3 + 9)}\pfive{(1 + 5)} \\ &= \ptwo{14} \times \pthree{13} \times \pfive{6} = \total{1{,}092} \end{aligned}