What is the largest value of $n$ less than 100,000 for which the expression $8(n-2)^5-n^2+14n-24$ is a multiple of 5?
By the Binomial Theorem, \begin{align*}
(n - 2)^5 &= n^5 - \binom{5}{1} \cdot 2n^4 + \binom{5}{2} \cdot 2^2 n^3 - \binom{5}{3} \cdot 2^3 n^2 \\
&\qquad + \binom{5}{4} \cdot 2^4 n - 2^5 \\
&= n^5 - 10n^4 + 40n^3 - 80n^2 + 80n - 32.
\end{align*} Note that this reduces to $n^5 - 32 \equiv n^5 + 3 \pmod{5}$.  Therefore, \begin{align*}
8(n - 2)^5 - n^2 + 14n - 24 &\equiv 8(n^5 + 3) - n^2 + 14n - 24 \\
&\equiv 8n^5 + 24 - n^2 + 14n - 24 \\
&\equiv 3n^5 - n^2 - n \pmod{5}.
\end{align*}

If $n \equiv 0 \pmod{5}$, then \[3n^5 - n^2 - n \equiv 3 \cdot 0^5 - 0^2 - 0 \equiv 0 \pmod{5}.\] If $n \equiv 1 \pmod{5}$, then \[3n^5 - n^2 - n \equiv 3 \cdot 1^5 - 1^2 - 1 \equiv 1 \pmod{5}.\] If $n \equiv 2 \pmod{5}$, then \[3n^5 - n^2 - n \equiv 3 \cdot 2^5 - 2^2 - 2 \equiv 90 \equiv 0 \pmod{5}.\] If $n \equiv 3 \pmod{5}$, then \[3n^5 - n^2 - n \equiv 3 \cdot 3^5 - 3^2 - 3 \equiv 717 \equiv 2 \pmod{5}.\] If $n \equiv 4 \pmod{5}$, then \[3n^5 - n^2 - n \equiv 3 \cdot 4^5 - 4^2 - 4 \equiv 3052 \equiv 2 \pmod{5}.\]

Therefore, the given expression is a multiple of 5 if and only if $n \equiv 0$ or $n \equiv 2 \pmod{5}$.

The largest value of $n$ less than 100000 that is congruent to 0 or 2 modulo 5 is $\boxed{99997}$.
99997
Level 5
Number Theory
Problem: What is the largest value of $n$ less than 100,000 for which the expression $8(n-2)^5-n^2+14n-24$ is a multiple of 5?
Solution:<|START_OF_LATENT|><|PRIOR_PREFIX|>To determine the largest value of n less than 100,000 for which the expression is a multiple of 5, we first simplify the expression: 

Let f(n) = 8(n-2)^5 - n^2 + 14n - 24. 

We need to find f(n) mod 5. 

First, we analyze each term in f(n) modulo 5. 

1. The term 8(n-2)^5 mod 5 simplifies to 3(n-2)^5 mod 5, since 8 mod 5 is 3.
2. The term -n^2 mod 5 remains as -n^2 mod 5.
3. The term 14n mod 5 simplifies to 4n mod 5, since 14 mod 5 is 4.
4. The constant term -24 mod 5 simplifies to 1, since -24 mod 5 is 1.

Thus, we rewrite f(n) mod 5 as:

f(n) ≡ 3(n-2)^5 - n^2 + 4n + 1 (mod 5).

Next, we need to evaluate (n-2)^5 mod 5. By Fermat's Little Theorem, for any integer a not divisible by p, a^(p-1) ≡ 1 (mod p). Therefore, we can evaluate (n-2) mod 5.

Let k = n mod 5. Then, n-2 mod 5 is equivalent to (k-2) mod 5. We analyze the cases for k = 0, 1, 2, 3, 4:

- If k = 0, (n-2) mod 5 = 3, so (n-2)^5 mod 5 = 3^5 mod 5 = 3.
- If k = 1, (n-2) mod 5 = 4, so (n-2)^5 mod 5 = 4^5 mod 5 = 4.
- If k = 2, (n-2) mod 5 = 0, so (n-2)^5 mod 5 = 0.
- If k = 3, (n-2) mod 5 = 1, so (n-2)^5 mod 5 = 1.
- If k = 4, (n-2) mod 5 = 2, so (n-2)^5 mod 5 = 2.

Now we substitute these values back into f(n) mod 5 for each case:

1. For k = 0: f(n) ≡ 3(3) - 0 + 0 + 1 ≡ 10 ≡ 0 (mod 5).
2. For k = 1: f(n) ≡ 3(4) - 1 + 4 + 1 ≡ 12 ≡ 2 (mod 5).
3. For k = 2: f(n) ≡ 3(0) - 4 + 8 + 1 ≡ 5 ≡ 0 (mod 5).
4. For k = 3: f(n) ≡ 3(1) - 9 + 12 + 1 ≡ 7 ≡ 2 (mod 5).
5. For k = 4: f(n) ≡ 3(2) - 16 + 16 + 1 ≡ 7 ≡ 2 (mod 5).

The values of n that make f(n) a multiple of 5 occur when k = 0 or k = 2. 

To find the largest n less than 100,000, we consider the largest numbers less than 100,000 that satisfy these conditions:

- For k = 0: n = 99995.
- For k = 2: n = 99997.

Among these, the largest value is 99997. 

Thus, the final answer is 99997.<|END_OF_LATENT|> The final answer is $99997$.