document.write( "Question 1210222: Find the number of arithmetic sequences such that:
\n" ); document.write( "* The arithmetic sequence contains three terms
\n" ); document.write( "* All the terms are integers in \{0, 1, 2, \dots, 10\}
\n" ); document.write( "* The sum of the terms is 9.
\n" ); document.write( "

Algebra.Com's Answer #851680 by CPhill(1959)\"\" \"About 
You can put this solution on YOUR website!
Let the three terms of the arithmetic sequence be $a-d, a, a+d$, where $a$ is the middle term and $d$ is the common difference. Since the terms are integers, $a$ and $d$ must be such that $a-d$ and $a+d$ are also integers.\r
\n" ); document.write( "\n" ); document.write( "The sum of the terms is given as 9:
\n" ); document.write( "$(a-d) + a + (a+d) = 9$
\n" ); document.write( "$3a = 9$
\n" ); document.write( "$a = 3$\r
\n" ); document.write( "\n" ); document.write( "So, the middle term of the arithmetic sequence must be 3.\r
\n" ); document.write( "\n" ); document.write( "The three terms of the sequence are now $3-d, 3, 3+d$.
\n" ); document.write( "We are given that all the terms are in the set $\{0, 1, 2, \dots, 10\}$. This gives us the following inequalities:
\n" ); document.write( "$0 \le 3-d \le 10$
\n" ); document.write( "$0 \le 3 \le 10$ (This is always true)
\n" ); document.write( "$0 \le 3+d \le 10$\r
\n" ); document.write( "\n" ); document.write( "Let's analyze the first inequality:
\n" ); document.write( "$0 \le 3-d \implies d \le 3$
\n" ); document.write( "$3-d \le 10 \implies -7 \le d$
\n" ); document.write( "Combining these, we get $-7 \le d \le 3$.\r
\n" ); document.write( "\n" ); document.write( "Now let's analyze the third inequality:
\n" ); document.write( "$0 \le 3+d \implies -3 \le d$
\n" ); document.write( "$3+d \le 10 \implies d \le 7$
\n" ); document.write( "Combining these, we get $-3 \le d \le 7$.\r
\n" ); document.write( "\n" ); document.write( "For all three terms to be in the set, $d$ must satisfy both $-7 \le d \le 3$ and $-3 \le d \le 7$. The intersection of these two ranges is $-3 \le d \le 3$.\r
\n" ); document.write( "\n" ); document.write( "Since the terms of the arithmetic sequence are integers, $d$ must be an integer. The possible integer values for $d$ are: $-3, -2, -1, 0, 1, 2, 3$.\r
\n" ); document.write( "\n" ); document.write( "Let's list the arithmetic sequences for each value of $d$:
\n" ); document.write( "If $d = -3$: $3-(-3), 3, 3+(-3) \implies 6, 3, 0$
\n" ); document.write( "If $d = -2$: $3-(-2), 3, 3+(-2) \implies 5, 3, 1$
\n" ); document.write( "If $d = -1$: $3-(-1), 3, 3+(-1) \implies 4, 3, 2$
\n" ); document.write( "If $d = 0$: $3-0, 3, 3+0 \implies 3, 3, 3$
\n" ); document.write( "If $d = 1$: $3-1, 3, 3+1 \implies 2, 3, 4$
\n" ); document.write( "If $d = 2$: $3-2, 3, 3+2 \implies 1, 3, 5$
\n" ); document.write( "If $d = 3$: $3-3, 3, 3+3 \implies 0, 3, 6$\r
\n" ); document.write( "\n" ); document.write( "All these sequences contain three terms, all terms are integers in $\{0, 1, 2, \dots, 10\}$, and the sum of the terms is $6+3+0=9$, $5+3+1=9$, $4+3+2=9$, $3+3+3=9$, $2+3+4=9$, $1+3+5=9$, $0+3+6=9$.\r
\n" ); document.write( "\n" ); document.write( "The number of possible integer values for $d$ is $3 - (-3) + 1 = 3 + 3 + 1 = 7$.
\n" ); document.write( "Thus, there are 7 such arithmetic sequences.\r
\n" ); document.write( "\n" ); document.write( "Final Answer: The final answer is $\boxed{7}$
\n" ); document.write( "
\n" );