document.write( "Question 1210184: I can only remember a seven-digit telephone number if the first three digits (the \"prefix\") are equal to the next three digits or the last three digits. For example, I can remember 389-3892 and 274-9274.\r
\n" ); document.write( "\n" ); document.write( "How many seven-digit telephone numbers can I remember?\r
\n" ); document.write( "\n" ); document.write( "(For this problem, a telephone number cannot start with a 0.)
\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #851501 by CPhill(1959)\"\" \"About 
You can put this solution on YOUR website!
Let's break down this problem into two cases based on the given condition.\r
\n" ); document.write( "\n" ); document.write( "**Case 1: The first three digits equal the next three digits.**\r
\n" ); document.write( "\n" ); document.write( "1. **First three digits:** Since the first digit cannot be 0, there are 9 choices for the first digit (1-9). For the second and third digits, there are 10 choices each (0-9).
\n" ); document.write( " * Number of choices for the first three digits: 9 * 10 * 10 = 900
\n" ); document.write( "2. **Next three digits:** These digits must be the same as the first three digits, so there's only 1 choice for each of these three digits.
\n" ); document.write( " * Number of choices for the next three digits: 1
\n" ); document.write( "3. **Last digit:** There are 10 choices for the last digit (0-9).
\n" ); document.write( " * Number of choices for the last digit: 10
\n" ); document.write( "4. **Total numbers in Case 1:** 900 * 1 * 10 = 9000\r
\n" ); document.write( "\n" ); document.write( "**Case 2: The first three digits equal the last three digits.**\r
\n" ); document.write( "\n" ); document.write( "1. **First three digits:** Same as Case 1, there are 900 choices.
\n" ); document.write( " * Number of choices for the first three digits: 900
\n" ); document.write( "2. **Next digit:** There are 10 choices for the next digit (0-9).
\n" ); document.write( " * Number of choices for the next digit: 10
\n" ); document.write( "3. **Last three digits:** These digits must be the same as the first three digits, so there's only 1 choice for each of these three digits.
\n" ); document.write( " * Number of choices for the last three digits: 1
\n" ); document.write( "4. **Total numbers in Case 2:** 900 * 10 * 1 = 9000\r
\n" ); document.write( "\n" ); document.write( "**Overlapping Case**\r
\n" ); document.write( "\n" ); document.write( "We've counted the numbers where the first three digits are equal to both the next three and the last three twice (e.g., 123-123123). We need to subtract these numbers once to avoid overcounting.\r
\n" ); document.write( "\n" ); document.write( "1. **First three digits:** 900 choices.
\n" ); document.write( "2. **Next three digits:** 1 choice.
\n" ); document.write( "3. **Last three digits:** 1 choice.
\n" ); document.write( "4. **Total numbers in the overlap:** 900 * 1 * 1 = 900\r
\n" ); document.write( "\n" ); document.write( "**Final Calculation**\r
\n" ); document.write( "\n" ); document.write( "* Total numbers = (Numbers in Case 1) + (Numbers in Case 2) - (Numbers in the overlap)
\n" ); document.write( "* Total numbers = 9000 + 9000 - 900 = 17100\r
\n" ); document.write( "\n" ); document.write( "**Therefore, you can remember 17,100 seven-digit telephone numbers.**
\n" ); document.write( "
\n" ); document.write( "
\n" );