Question:hard

For each \(p > 1\), a sequence \(A_n\) is defined by \(A_0 = 1\) and \(A_n = np + (-1)^n A_{n-1}\) for \(n \geq 1\). For how many integer values of \(p\) is 1000 a term of the sequence?

Show Hint

Group the terms by their index mod 4; only two of the four groups can ever equal a value like 1000, and both reduce to divisors of 1001.
Updated On: Jul 10, 2026
  • 8
  • 7
  • 5
  • 4
Show Solution

The Correct Option is C

Solution and Explanation

Step 1: Combine two steps of the recurrence into one relation.
Starting from $A_n = np + (-1)^n A_{n-1}$, substitute the same rule one step earlier for $A_{n-1} = (n-1)p + (-1)^{n-1}A_{n-2}$:
$A_n = np + (-1)^n\big[(n-1)p + (-1)^{n-1}A_{n-2}\big] = np + (-1)^n(n-1)p + (-1)^{2n-1}A_{n-2}$
Since $(-1)^{2n-1} = -1$ always (the exponent $2n-1$ is odd for every integer $n$), this becomes:
\[ A_n = \big[n + (-1)^n(n-1)\big]p - A_{n-2} \]
This single relation now jumps two steps at a time, skipping the awkward alternating sign entirely.

Step 2: Split this into an odd-index rule and an even-index rule.
For odd $n$: $(-1)^n = -1$, so the bracket becomes $n - (n - 1) = 1$, giving $A_n = p - A_{n-2}$.
For even $n$: $(-1)^n = 1$, so the bracket becomes $n + (n-1) = 2n - 1$, giving $A_n = (2n-1)p - A_{n-2}$.

Step 3: Unroll the odd-index rule starting from $A_1 = p - 1$.
$A_3 = p - A_1 = p - (p - 1) = 1$
$A_5 = p - A_3 = p - 1$
$A_7 = p - A_5 = 1$
The odd-indexed terms simply flip between $p - 1$ and $1$ every step: every index $\equiv 1 \bmod 4$ gives $p - 1$, and every index $\equiv 3 \bmod 4$ gives $1$.

Step 4: Unroll the even-index rule starting from $A_0 = 1$.
$A_2 = 3p - A_0 = 3p - 1$
$A_4 = 7p - A_2 = 7p - (3p-1) = 4p + 1$
$A_6 = 11p - A_4 = 11p - (4p+1) = 7p - 1$
$A_8 = 15p - A_6 = 15p - (7p-1) = 8p+1$
So the terms of the form $cp - 1$ that show up here are $A_2 = 3p-1$, $A_6 = 7p-1$, $A_{10} = 11p - 1$, and so on, with coefficients $3, 7, 11, 15, \ldots$

Step 5: Combine both families and solve $cp - 1 = 1000$.
Putting the odd-index family ($c = 1$) together with the even-index family ($c = 3, 7, 11, 15, \ldots$), we need $cp = 1001 = 7 \times 11 \times 13$. Checking every divisor of 1001 against the requirement $c = 1$ or $c \equiv 3 \pmod 4$: divisors $1, 7, 11, 91, 143$ pass; divisors $13, 77, 1001$ fail, since they leave remainder 1, not 3, when divided by 4, and none of them equal 1 either.

Step 6: Convert the 5 valid divisors into 5 values of p.
$p = 1001/1 = 1001$, $p = 1001/7 = 143$, $p = 1001/11 = 91$, $p = 1001/91 = 11$, $p = 1001/143 = 7$. All five are integers greater than 1.

Final Answer:
There are exactly 5 integer values of $p$ that make 1000 a term of the sequence.
\[ \boxed{5} \]
Was this answer helpful?
0


Questions Asked in XAT exam