Recurrence Relation

Algebra Level 5

Brilli the ant has thought up a diabolical sequence of integers a n a_n . It has initial values a 1 = 1 a_1 = 1 and a 2 = 3 a_2 = 3 . Subsequent terms are given by

a n = ( n + 1 ) a n 1 n a n 2 for n 3. a_n = (n+1) a_{n-1} - n a_{n-2} \quad \mbox{ for } n\geq 3. Brilli the ant wants to know, how many integer values of n n from 1 to 1000 (inclusive) are there such that a n a_n is a multiple of 11?


The answer is 993.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

23 solutions

Muhammad Al Kahfi
Jul 14, 2013

We can rewrite the equation into : ( a n a n 1 ) = n ( a n 1 a n 2 ) a n a n 1 a n 1 a n 2 = n (a_n - a_{n-1} ) = n(a_{n-1} - a_{n-2}) \implies \frac{a_n - a_{n-1}}{a_{n-1} - a_{n-2}} = n

i = 3 n a n a n 1 a n 1 a n 2 = n ( n 1 ) ( n 2 ) 3 \prod_{i=3}^{n} \frac{a_n - a_{n-1}}{a_{n-1} - a_{n-2}} = n(n-1)(n-2) \ldots 3

Then, by telescoping, it's easy to see that :

a n a n 1 a 2 a 1 = n ! 2 a n a n 1 = n ! \frac{a_n-a_{n-1}}{a_2 - a_1} = \frac{n!}{2} \implies a_n - a_{n-1} = n!

Then, from above we obtain that, for n 11 n \ge 11 , we have : a n a n 1 = n ! 0 ( m o d 11 ) a_n - a_{n-1} = n! \equiv 0 \pmod{11} a n = a n 1 ( m o d 11 ) a_n = a_{n-1} \pmod{11} . So, we just need to check from a 1 a_1 to a 11 a_{11}

Now, by recurrence we obtain : a 1 1 ( m o d 11 ) a_1 \equiv 1 \pmod{11} a 2 3 ( m o d 11 ) a_2 \equiv 3 \pmod{11} a 3 a 2 + 3 ! 9 ( m o d 11 ) a_3 \equiv a_2 + 3! \equiv 9 \pmod{11} a 4 a 3 + 4 ! 0 ( m o d 11 ) a_4 \equiv a_3 + 4! \equiv 0 \pmod{11} a 5 a 4 + 5 ! 1 ( m o d 11 ) a_5 \equiv a_4 + 5! \equiv -1 \pmod{11} a 6 a 5 + 6 ! 4 ( m o d 11 ) a_6 \equiv a_5 + 6! \equiv 4 \pmod{11} a 7 a 6 + 7 ! 6 ( m o d 11 ) a_7 \equiv a_6 + 7! \equiv 6 \pmod{11} a 8 a 7 + 8 ! 0 ( m o d 11 ) a_8 \equiv a_7 + 8! \equiv 0 \pmod{11} a 9 a 8 + 9 ! 1 ( m o d 11 ) a_9 \equiv a_8 + 9! \equiv 1 \pmod{11} a 10 a 9 + 10 ! 0 ( m o d 11 ) a_{10} \equiv a_9 + 10! \equiv 0 \pmod{11} a 11 a 10 + 11 ! 0 ( m o d 11 ) a_{11} \equiv a_{10} + 11! \equiv 0 \pmod{11}

Then, from the first one we obtain a n 0 ( m o d 11 ) n 11 a_n \equiv 0 \pmod{11} \forall n \ge 11 and n N n \in \mathbb{N}

So, from a 1 a_1 to a 1000 a_{1000} , the number that multiple 11 are a 4, a 8, and {a n} {n \ge 10}, The total is ( 1000 10 + 1 ) + 1 + 1 = 993 (1000 - 10 + 1) + 1 + 1 = \boxed{993}

Hmm, there is one typo. It should be : i = 3 n a i a i 1 a i 1 a i 2 = n ( n 1 ) ( n 2 ) 3 \prod_{i=3}^n \frac{a_i - a_{i-1}}{a_{i-1} - a_{i-2}} = n(n-1)(n-2)…3

Muhammad Al Kahfi - 7 years, 11 months ago

Great solution! Could you explain how the product telescopes?

Aradhya Kasera - 7 years, 10 months ago
Alex Yu
Jul 14, 2013

To first attempt to a notice a pattern, simply compute the first few terms modulo 11, and the residues of the first few terms are a 1 1 , a 2 3 , a 3 9 , a 4 0 , a 5 10 , a 6 4 , a 7 6 , a 8 0 , a 9 1 , a 10 0 , a 11 0 a_1 \equiv 1, a_2 \equiv 3, a_3 \equiv 9, a_4 \equiv 0, a_5 \equiv 10, a_6 \equiv 4, a_7 \equiv 6, a_8 \equiv 0, a_9 \equiv 1, a_{10} \equiv 0, a_{11} \equiv 0 . From then on, it is clear that every term afterwards will be a multiple of 11, as if 11 a n 1 , a n 2 11|a_{n-1}, a_{n-2} , then clearly 11 ( n + 1 ) a n 1 n a n 2 = a n 11 | (n+1)a_{n-1} - na_{n-2} = a_{n} .

So 11 a n 11|a_n for n = 10 , 11 , , 1000 n=10, 11, \ldots, 1000 (which results in 991 991 values of n n ), as well as n = 4 , 8 n=4, 8 . So then there are 991 + 2 = 993 991+2 = \boxed{993} values of n n .

Nice observation that if 11 a n 1 , a n 2 11 \mid a_{n-1}, a_{n-2} then 11 a n 11 \mid a_n .

Calvin Lin Staff - 7 years, 11 months ago
Eklavya Sharma
May 20, 2014

a n = ( n + 1 ) a n 1 n a n 2 a_n=(n+1)a_{n-1}-na_{n-2}

So, a n a n 1 = n ( a n 1 a n 2 ) a_n-a_{n-1}=n(a_{n-1}-a_{n-2})

As a 2 a 1 = 2 , a n a n 1 = n ! a_2-a_1=2, a_n-a_{n-1}=n!

Compute the first 11 terms. a 4 a_4 , a 8 a_8 and a 10 a_{10} will be divisible by 11.

a 11 = a 10 + 11 ! a_{11}=a_{10}+11! . As both a 10 a_{10} and 11 ! 11! are divisible by 11, a 11 a_{11} is divisible by 11.

a 12 = a 11 + 12 ! a_{12}=a_{11}+12! . As both a 11 a_{11} and 12 ! 12! are divisible by 11, a 12 a_{12} is divisible by 11. Similarly all terms above a 10 a_{10} are divisible by 11.

a 4 a_4 , a 8 a_8 and all terms from a 10 a_{10} to a 1000 a_{1000} are divisible by 11. Number of terms divisible by 11 = 2 + ( 1000 10 + 1 ) = 993 = 2+(1000-10+1) = 993

Kiriti Mukherjee
Jul 19, 2013

At first we simply compute the first few terms modulo 11 11 and the residues of the first few terms are ,

a 1 1 ( m o d 11 ) a_1 \equiv 1 \pmod{11}

a 2 3 ( m o d 11 ) a_2 \equiv 3 \pmod{11}

a 3 9 ( m o d 11 ) a_3 \equiv 9 \pmod{11}

a 4 0 ( m o d 11 ) a_4 \equiv 0 \pmod{11}

a 5 1 ( m o d 11 ) a_5 \equiv -1 \pmod{11}

a 6 4 ( m o d 11 ) a_6 \equiv 4 \pmod{11}

a 7 6 ( m o d 11 ) a_7 \equiv 6 \pmod{11}

a 8 0 ( m o d 11 ) a_8 \equiv 0 \pmod{11}

a 9 1 ( m o d 11 ) a_9 \equiv 1 \pmod{11}

a 10 0 ( m o d 11 ) a_{10} \equiv 0 \pmod{11}

a 11 0 ( m o d 11 ) a_{11} \equiv 0 \pmod{11}

From then on, it is clear that every term afterwards will be a multiple of 11 11 , as if 11 a n 1 , a n 2 11| a_{n-1} , a_{n-2} then clearly 11 ( n + 1 ) a n 1 n a n 2 11| (n+1)a_{n-1} -na_{n-2} . That means 11 a n 11|a_n .

So, 11 a n 11|a_n where n S = n∈S= { 4 , 8 , 10 , 11 , 12.......999 , 1000 4,8,10,11,12.......999,1000 } and n ( S ) = 993 n(S) =\boxed {993}

Ed Mañalac
May 20, 2014

a {n}=(n+1)(a {n-1} - n(a_{n-2})

solving for n, we have n=\frac {a {n}-a {n-1}}{a {n-1}-a {n-2}}

if n=n, we have n=\frac {a {n}-a {n-1}}{a {n-1}-a {n-2}} if n=n-1 we have n-1=\frac {a {n-1}-a {n-2}}{a {n-2}-a {n-3}} if n=n-2 we have n-2=\frac {a {n-2}-a {n-3}}{a {n-3}-a {n-4}} ... if n=n-(n-3)=3 we have 3=\frac {a {3}-a {2}}{a {2}-a {1}}

notice that if we multiply all the equations, we have a telescoping product, thus we have

n(n-1)(n-2)(n-3)...(4)(3)=\frac {a {n}-a {n-1}}{a {2}-a {1}}

rearranging the equation, we have n(n-1)(n-2)(n-3)..(4)(3)(a {2}-a {1}) = a_{n} - a{n-1}

since a {2}=3 and a {1}=1, then a {2}-a {1}=2

this implies that n(n-1)(n-2)(n-3)..(4)(3)(a {2}-a {1}) = a {n} - a{n-1} n(n-1)(n-2)(n-3)..(4)(3)(2) = a {n} - a{n-1} n!=a_{n} - a{n-1}

we have a {n}=n! + a {n-1} since n! \equiv 0 \pmod{11} for n \geq 11 this implies that a {n} \equiv 0 \pmod{11} for n \geq 11 this implies that if a {10} \equiv 0\pmod{11} then a {11} upto a {1000} is divisible by 11, thus we have to check the terms a {1} upto a {10}

a 1 \equiv 1\pmod{11} a 2 \equiv 3\pmod{11} a 3 \equiv 9\pmod{11} a 4 \equiv 0\pmod{11} a 5 \equiv 10\pmod{11} a 6 \equiv 4\pmod{11} a 7 \equiv 6\pmod{11} a 8 \equiv 0\pmod{11} a 9 \equiv 1\pmod{11} a {10} \equiv 0\pmod{11}

notice that a {10} \equiv 0 \pmod{11} then a {11} upto a {1000} are divisible by 11, so we just have to count the terms from a 1 to a 10 that are not divisible by 11 and subtract it from 1000, thus only a 4 , a 8, and a {10} are divisible by 11, thus there are 7 who are not divisible, thus

1000-7 =993 answer: 993

Somewhat roundabout way to write up a solution. Suspiciously similar to https://admin.brilliant.org/nexus/admin/assessment/usersolution/7667/

Calvin Lin Staff - 7 years ago

a n = ( n + 1 ) a n 1 n a n 2 a_{n}=(n+1)a_{n-1}-na_{n-2}

First, we need to simplify the equation above into

a n a n 1 = n ( a n 1 a n 2 ) a_{n}-a_{n-1}=n(a_{n-1}-a_{n-2})

By substituting value n = k , ( k 1 ) , ( k 2 ) , 3 n=k,(k-1),(k-2),\cdots3 we have

a k a k 1 = k ( a k 1 a k 2 ) a_{k}-a_{k-1}=k(a_{k-1}-a_{k-2})

a k 1 a k 2 = ( k 1 ) ( a k 2 a k 3 ) a_{k-1}-a_{k-2}=(k-1)(a_{k-2}-a_{k-3})

a k 2 a k 3 = ( k 2 ) ( a k 3 a k 4 ) a_{k-2}-a_{k-3}=(k-2)(a_{k-3}-a_{k-4})

\vdots

a 3 a 2 = 3 ( a 2 a 1 ) a-{3}-a_{2}=3(a_{2}-a_{1})

Product all the equation above which give new equation

( a k a k 1 ) ( a k 1 a k 2 ) ( a k 2 a k 3 ) ( a 3 a 2 ) = ( k ( k 1 ) ( k 2 ) 3 ) ( ( a k 1 a k 2 ) ( a k 2 a k 3 ) ( a k 3 a k 4 ) ( a 2 a 1 ) ) (a_{k}-a_{k-1})(a_{k-1}-a_{k-2})(a_{k-2}-a_{k-3})\cdots(a_{3}-a_{2})=(k(k-1)(k-2)\cdots3)((a_{k-1}-a-{k-2})(a_{k-2}-a_{k-3})(a_{k-3}-a_{k-4})\cdots(a_{2}-a_{1}))

Simplify the equation above as we get

a k a k 1 = k ! 2 ! ( a 2 a 1 ) a_{k}-a_{k-1}=\frac{k!}{2!}(a_{2}-a_{1})

Because ( a 2 a 1 ) = 2 (a_{2}-a_{1})=2 then

a k a k 1 = k ! a_{k}-a_{k-1}=k!

So we may conclude that a n = ( n + 1 ) a n 1 n a n 2 a_{n}=(n+1)a_{n-1}-na_{n-2} can be expressed as a n = a n 1 + n ! a_{n}=a_{n-1}+n!

Since for n 11 , a n n\geq11, a_{n} is divisible by 11. 11. Then we must check for n = 1 , 2 , 3 , 10 n=1,2,3, \cdots10

a 1 1 ( m o d 11 ) , a 2 3 ( m o d 11 ) , a 3 9 ( m o d 11 ) , a 4 0 ( m o d 11 ) a_{1}\equiv1\pmod{11},a_{2}\equiv3\pmod{11},a_{3}\equiv9\pmod{11},a_{4}\equiv0\pmod{11} a 5 1 ( m o d 11 ) , a 6 4 ( m o d 11 ) , a 7 6 ( m o d 11 ) , a 8 0 ( m o d 11 ) a_{5}\equiv-1\pmod{11},a_{6}\equiv4\pmod{11},a_{7}\equiv6\pmod{11},a_{8}\equiv0\pmod{11} a 9 1 ( m o d 11 ) , a 10 0 ( m o d 11 ) a_{9}\equiv1\pmod{11},a_{10}\equiv0\pmod{11}

Hence, the satisfying value for n n are a 4 , a 8 , a 10 a_{4},a_{8},a_{10} and a 11 a 1000 a_{11}-a_{1000} which is 3 + 990 = 993 3+990=993

Wow, easy to understand. But I think a 3 a 2 = 3 ( a 2 a 1 ) a - 3 - a_{2} = 3(a_{2} - a_{1}) should be a 3 a 2 = 3 ( a 2 a 1 ) a_{3} - a_{2} = 3(a_{2} - a_{1})

Natasha Indriani - 7 years, 10 months ago

Log in to reply

Oh yes, thank you for pointed my mistake, It is not written correctly.

Fariz Azmi Pratama - 7 years, 10 months ago
Xuan Hien Bui
Jul 15, 2013

From the equation : a n a_{n} = ( n +1). a n 1 a_{n-1} - n . a n 2 a_{n-2}

We have a n a_{n} - a n 1 a_{n-1} = n . ( a n 1 a_{n-1} - a n 2 a_{n-2} )

similarly a n 1 a_{n-1} - a n 2 a_{n-2} = ( n -1) . ( a n 2 a_{n-2} - a n 3 a_{n-3} )

a n 2 a_{n-2} - a n 3 a_{n-3} = ( n -2) . ( a n 3 a_{n-3} - a n 4 a_{n-4} )

                 ..................

a 3 a_{3} - a 2 a_{2} = 3. ( a 2 a_{2} - a 1 a_{1} )

Because a 2 a_{2} - a 1 a_{1} = 3 -1 =2 , hence a n a_{n} - a n 1 a_{n-1} = n!

and a n a_{n} = 1! +2! +3! + ... + n!

if 1 =< n =< 10 , only a 4 a_{4} , a 8 a_{8} , a 10 a_{10} are the mutiples of 11

n >= 11, n! is the mutiple of 11 with any n , so from a 11 a_{11} to a 1000 a_{1000} are the mutiples of 11

finally, we have 3 + (1000-11):1+1 = 993

You determined the value of a n a_n . That's great!

Calvin Lin Staff - 7 years, 11 months ago

From the given equation, we have: a n a n 1 = n ( a n 1 a n 2 ) a_n-a_{n-1}=n(a_{n-1}-a_{n-2}) .

Therefore, a n a n 1 = n ( a n 1 a n 2 ) a_n-a_{n-1}=n(a_{n-1}-a_{n-2}) = n ( n 1 ) ( a n 2 a n 3 ) = . . . = n ! 2 ! ( a 2 a 1 ) =n(n-1)(a_{n-2}-a_{n-3})=...=\frac{n!}{2!} (a_2-a_1) .

Because a 2 a 1 = 2 ! a_2-a_1=2! , so a n = n ! + a n 1 a_n=n!+a_{n-1} .

Because if n 11 n \geq 11 , n ! 0 ( m o d 11 ) n! \equiv 0 (mod 11) or a n a n 1 ( m o d 11 ) a_n \equiv a_{n-1} (mod 11) . Therefore, we only need to check from a 1 a_1 to a 10 a_{10} .

By recurrence, we have from a 1 a_1 to a 10 a_{10} , only a 4 , a 8 , a 10 a_4,a_8,a_{10} are multiples of 11. This also leads to a n a_n is a multiple of 11 with all n 11 n \geq 11 .

Therefore, the answer is: (1000-11+1) + 3 = 993

Jan J.
Jul 15, 2013

We'll first experiment with few first values and see what happens. We have (This is found out by simply plugging in values for n n ):

a 1 1 ( m o d 11 ) a_1 \equiv 1 \pmod{11}

a 2 3 ( m o d 11 ) a_2 \equiv 3 \pmod{11}

a 3 9 ( m o d 11 ) a_3 \equiv 9 \pmod{11}

a 4 0 ( m o d 11 ) a_4 \equiv 0 \pmod{11}

a 5 10 ( m o d 11 ) a_5 \equiv 10 \pmod{11}

a 6 4 ( m o d 11 ) a_6 \equiv 4 \pmod{11}

a 7 6 ( m o d 11 ) a_7 \equiv 6 \pmod{11}

a 8 0 ( m o d 11 ) a_8 \equiv 0 \pmod{11}

a 9 1 ( m o d 11 ) a_9 \equiv 1 \pmod{11}

a 10 0 ( m o d 11 ) a_{10} \equiv 0 \pmod{11}

a 11 0 ( m o d 1 ) a_{11} \equiv 0 \pmod{1}

Now it is clear that any a n a_n with n 12 n \geq 12 will be divisible by 11 11 because for example for n = 12 n = 12 we get a 12 13 0 12 0 0 ( m o d 11 ) a_{12} \equiv 13 \cdot 0 - 12 \cdot 0 \equiv 0 \pmod{11} . So there are only 7 7 terms not divisible by 11 11 , thus there are 1000 7 = 993 1000 - 7 = \boxed{993} terms divisible by 11 11 .

The last modulus is supposed to be 11 11 and not 1 1 but I can't edit the post..

Jan J. - 7 years, 11 months ago
Daniel Chiu
Jul 15, 2013

In this problem, computing values up to a point seems like it might work.

To make this a little easier, we work in modulo 11 and rewrite our equation: a n = n ( a n 1 a n 2 ) + a n 1 a_{n}=n(a_{n-1}-a_{n-2})+a_{n-1} Now, a 1 1 ( m o d 11 ) a_{1}\equiv 1 \pmod {11} a 2 3 ( m o d 11 ) a_{2}\equiv 3 \pmod {11} a 3 9 3 2 + 3 ( m o d 11 ) a_{3}\equiv 9\equiv 3\cdot 2+3 \pmod {11} a 4 0 4 6 + 9 ( m o d 11 ) a_{4}\equiv 0\equiv 4\cdot 6+9 \pmod {11} a 5 10 5 2 + 0 ( m o d 11 ) a_{5}\equiv 10\equiv 5\cdot 2+0 \pmod {11} a 6 4 6 10 + 10 ( m o d 11 ) a_{6}\equiv 4\equiv 6\cdot 10+10 \pmod {11} a 7 6 7 5 + 4 ( m o d 11 ) a_{7}\equiv 6\equiv 7\cdot 5+4 \pmod {11} a 8 0 8 2 + 6 ( m o d 11 ) a_{8}\equiv 0\equiv 8\cdot 2+6 \pmod {11} a 9 1 9 5 + 0 ( m o d 11 ) a_{9}\equiv 1\equiv 9\cdot 5+0 \pmod {11} a 10 0 10 1 + 1 ( m o d 11 ) a_{10}\equiv 0\equiv 10\cdot 1+1 \pmod {11} a 11 0 11 10 + 0 ( m o d 11 ) a_{11}\equiv 0\equiv 11\cdot 10+0 \pmod {11} It is easy to see that for n > 11 n>11 a n 0 ( m o d 11 ) a_{n}\equiv 0 \pmod {11} This follows from the fact that 0 0 + 0 = 0 0\cdot 0+0=0 Now, looking at our table, we have 7 nonzero values modulo 11, so the answer is 1000 7 = 993 1000-7=\boxed{993}

Lucas Reis
Jul 15, 2013

Lemma: a n = a n 1 + n ! , n 2 a_n=a_{n-1}+n!, n\ge 2

Proof: By induction in n n . If n = 2 n=2 , we have a 2 = 3 = 1 + 2 = a 1 + 2 ! a_2=3=1+2=a_1+2!\\ Fixed m 2 , m N m\ge 2, m\in \mathbb N suppose that law a n = a n 1 + n ! a_n=a_{n-1}+n! is true for n = m n=m\\ , that is, a m = a m 1 + m ! a m a m 1 = m ! a_m=a_{m-1}+m!\Rightarrow a_m-a_{m-1}=m!\\

Where we have a m + 1 = ( m + 2 ) a m ( m + 1 ) a m 1 = a_{m+1}=(m+2)*a_{m}-(m+1)*a_{m-1}=\\ ( m + 1 ) ( a m a m 1 ) + a m = ( m + 1 ) m ! + a m (m+1)*(a_{m}-a_{m-1})+a_{m}=(m+1)*m!+a_{m} = ( m + 1 ) ! + a m =(m+1)!+a_m\\ And by Induction Principle, the lemma is proved.

Now, since that 11 n ! , n 11 11|n!, n\ge 11 , by the Lemma, we have a n a 10 ( m o d 11 ) , n 11 a_n\equiv a_{10}\pmod{11}, n\ge 11 . By the Lemma, it's easy to see that:

\\ a 1 1 ( m o d 11 ) a_1\equiv 1\pmod{11}

a 2 3 ( m o d 11 ) a_2\equiv 3\pmod{11}

a 3 3 + 3 ! 9 ( m o d 11 ) a_3\equiv 3+3!\equiv 9\pmod{11}

a 4 9 + 4 ! 0 ( m o d 11 ) a_4\equiv 9+4!\equiv 0\pmod{11}

a 5 0 + 5 ! 1 ( m o d 11 ) a_5\equiv 0+5!\equiv -1\pmod{11}

a 6 1 + 6 ! 4 ( m o d 11 ) a_6\equiv -1+6!\equiv 4\pmod{11}

a 7 4 + 7 ! 6 ( m o d 11 ) a_7\equiv 4+7!\equiv 6\pmod{11}

a 8 6 + 8 ! 0 ( m o d 11 ) a_8\equiv 6+8!\equiv 0\pmod{11}

a 9 0 + 9 ! 1 ( m o d 11 ) a_9\equiv 0+9!\equiv 1\pmod{11}

a 10 1 + 10 ! 0 ( m o d 11 ) a_{10}\equiv 1+10!\equiv 0\pmod{11}

Since we have a n a 10 0 ( m o d 11 ) , n 11 a_n\equiv a_{10}\equiv 0\pmod{11}, n\ge 11 , there are 1000 11 + 1 = 990 1000-11+1=990 values of n , 11 n 1000 n, 11\le n\le 1000 such that 11 a n 11|a_n and more 3 values n = 4 , 8 , 10 < 11 n=4, 8, 10<11 , totaling 993 993 values.

From a n = ( n + 1 ) a n 1 n a n 2 a_n=(n+1)a_{n-1}-na_{n-2} we have a n a n 1 = n ( a n 1 a n 2 = . . . = n ! a_n-a_{n-1}=n(a_{n-1}-a_{n-2}=...=n! This gives a n = n ! + a n 1 = . . . . = n ! + ( n 1 ) ! + . . . + 1 a_n=n!+a_{n-1}=....=n!+(n-1)!+...+1 It's easy to check that a n a_n is a multiple of 11 <=> n=4,8,10 and n 11 n \geq 11 Hence the answer is 993

oh gosh why cant I type Latex?? I have already used the \­( ...\­) for the formula

Bờ La Bốc Khói - 7 years, 11 months ago

Log in to reply

I looked into what you typed, and it appears that you have an empty space between the \ and the (, which is why it doesn't compile for you. You can test it out in the discussions, where you get to edit your post, and you can see it happening.

I've modified your solution to remove the empty space, and have it display.

Calvin Lin Staff - 7 years, 10 months ago

Log in to reply

tks so much !

Bờ La Bốc Khói - 7 years, 10 months ago
Michael Tong
Jul 14, 2013

As is standard for most problems involving recurrence relations, we first start out by trying to find patterns from the first few elements.

Using the recurrence stated, we get the first 5 5 elements to be 1 , 3 , 9 , 33 , 153 1, 3, 9, 33, 153 . Observing consecutive differences, we get 3 1 = 2 , 9 3 = 6 , 33 9 = 24 , 153 33 = 120 3-1 = 2, 9-3 = 6, 33 - 9 = 24, 153 - 33 = 120 . These differences are 2 ! , 3 ! , 4 ! , 5 ! 2!, 3!, 4!, 5! , respectively. Thus, a k = n = 1 k n ! a_k = \displaystyle \sum_{n=1}^k n! This can be proven easily.

a k = ( k + 1 ) ( ( k 1 ) ! + ( k 2 ) ! + + 1 ! ) ( k ) ( ( k 2 ) ! + + 1 ! ) = a_k = (k+1)((k-1)! + (k-2)! + \ldots + 1!) - (k)((k-2)! + \ldots + 1!) =

( k 1 ) ! + ( k 2 ) ! + + 1 ! + ( k ) ( ( k 1 ) ! + ( k 2 ) ! + + 1 ! (k-1)! + (k - 2)! + \ldots + 1! + (k)((k - 1)! + (k - 2)! + \ldots + 1! -

( ( k 2 ) ! + ( k 1 ) ! + + 1 ! ) ) ) = ((k - 2)! + (k - 1)! + \ldots + 1!))) =

( k 1 ) ! + ( k 2 ) ! + . . . + 1 ! + ( k ) ( ( k 1 ) ! ) = n = 1 k n ! (k - 1)! + (k - 2)! + ... + 1! + (k)((k - 1)!) = \displaystyle \sum_{n=1}^k n!

Next, we must look for multiples of 11. From the first 5 terms, it is clear that the fourth term is a multiple of 11. We look to find any more multiples of 11 until we get to a 10 a_{10} , as if a 10 a_{10} is a multiple of 11 then all of the following terms are as well, but if it is not then none of the following terms are multiples of 11.

> This is due to the fact that for for every term a k a_k with k 11 k \geq 11 the difference between each consecutive term is a multiple of 11 because n ! n! is a multiple of 11 when n 11 n \geq 11 . Thus, for all a k a_k with k 11 k \geq 11 a k m ( m o d 11 ) a_k \equiv m \pmod{11} , i.e. the residue when considered mod 11 is consistent.

However, the numbers get very large, so it is not feasible to deal with them unless we consider them in a more representative fashion using the following method:

a 5 a_5 can be expressed as a 4 + 5 ! ( 1 ) a_4 + 5!(1) . Furthermore, a 6 a_6 can be expressed as a 4 + 5 ! ( 1 + 6 ) a_4 + 5!(1 + 6) , and a 7 a_7 as a 4 + 5 ! ( 1 + 6 + 42 ) a_4 + 5!(1 + 6 + 42) , and finally a 8 a_8 as a 4 + 5 ! ( 1 + 6 + 42 + 336 ) = a 4 + 5 ! ( 385 ) a_4 + 5!(1 + 6 + 42 + 336) = a_4 + 5!(385) . Since 385 385 is a multiple of 11 and a 4 a_4 is a multiple of 11, a 8 a_8 must then be a multiple of 11 and, using the same logic, since neither 1, 7, nor 49 are multiples of 11 and 11 is prime, a 5 , a 6 , a_5, a_6, and a 7 a_7 are not multiples of 11.

Using the same method with a 8 a_8 , we come to a 10 = 9 ! ( 1 + 10 ) a 10 a_{10} = 9!(1 + 10) \rightarrow a_{10} is a multiple of 11.

Since a 10 a_{10} is a multiple of 11, every term a k a_k with k 11 k \geq 11 is also divisible by 11. Thus, the number of integer values of n from 1 to 1000 that satisfy the equation is 2 + 991 993 2 + 991 \Rightarrow 993

In my answer I made it so it was calculator free because in many competition situations, you would not be able to use a calculator.

Michael Tong - 7 years, 11 months ago
Michael Tang
Jul 16, 2013

Manipulating the recursive formula given, we get a n a n 1 = n ( a n 1 a n 2 ) . a_n - a_{n-1} = n(a_{n-1} - a{n-2}). Let b n = a n + 1 a n b_n = a_{n+1}-a_n ; then this becomes b n = ( n + 1 ) b n 1 b_n = (n+1)b_{n-1} , after shifting the indices up by one. Because a 1 = 1 a_1 = 1 and a 2 = 3 , a_2 = 3, we know that b 1 = 2. b_1 = 2. Using our formula for b n , b_n, we calculate the next few values of b n , b_n, reduced m o d 11 \mod{11} : b 1 = 2 , b_1 = 2, b 2 = 3 ( 2 ) = 6 , b_2 = 3(2) = 6, b 3 = 4 ( 6 ) 2 , b_3 = 4(6) \equiv 2, b 4 5 ( 2 ) = 10 , b_4 \equiv 5(2) = 10, b 5 6 ( 10 ) 5 , b_5 \equiv 6(10) \equiv 5, b 6 7 ( 5 ) 2 , b_6 \equiv 7(5) \equiv 2, b 7 8 ( 2 ) 5 , b_7 \equiv 8(2) \equiv 5, b 8 9 ( 5 ) 1 , b_8 \equiv 9(5) \equiv 1, b 9 10 ( 1 ) = 10 , b_9 \equiv 10(1) = 10, b 10 11 ( 10 ) 0. b_{10} \equiv 11(10) \equiv 0.

Notice that because b 10 0 ( m o d 11 ) , b_{10} \equiv 0 \pmod{11}, every term after it will also be congruent to 0 , m o d 11 , 0, \mod{11}, as all we are doing to find these values is multiplying and reducing. Because we defined b n b_n as the difference between consecutive terms of a n , a_n, we can use these values to find the terms of a n ( m o d 11 ) a_n \pmod {11} : a 1 = 1 , a_1 = 1, a 2 = 3 , a_2 = 3, a 3 = a 2 + b 2 = 3 + 6 = 9 , a_3 = a_2 + b_2 = 3 + 6 = 9, a 4 = a 3 + b 3 9 + 2 0 , a_4 = a_3 + b_3 \equiv 9 + 2 \equiv \boxed{0}, a 5 0 + 10 = 10 , a_5 \equiv 0 + 10 = 10, a 6 10 + 5 4 , a_6 \equiv 10 + 5 \equiv 4, a 7 4 + 2 = 6 , a_7 \equiv 4 + 2 = 6, a 8 6 + 5 0 , a_8 \equiv 6+5 \equiv \boxed{0}, a 9 0 + 1 = 1 , a_9 \equiv 0 + 1 = 1, a 10 1 + 10 0 . a_{10} \equiv 1 + 10 \equiv \boxed{0}.

Because all of b 10 , b 11 , b 12 , b_{10}, b_{11}, b_{12}, \ldots are zero, so are a 10 , a 11 , a 12 , . a_{10}, a_{11}, a_{12}, \ldots. From the list above, we see that a 4 a_4 and a 8 a_8 are two additional terms that are multiples of 11 , 11, so in total there are 2 + ( 1000 10 + 1 ) = 993 2 + (1000 - 10 + 1) = \boxed{993} terms in a 1 , a 2 , , a 1000 a_1, a_2, \ldots, a_{1000} that are multiples of 11. 11.

Calvin Lin Staff
Nov 30, 2015

Rewrite the recurrence relation as a n a n 1 = n ( a n 1 a n 2 ) a_n - a_{n-1} = n (a_{n-1} - a_{n-2}) . With the starting value a 2 a 1 = 2 a_2-a_1 = 2 , we can show (by induction) that a n a n 1 = n ! a_n - a_{n-1} = n! . Hence,

a n = ( a n a n 1 ) + ( a n 1 a n 2 ) + + ( a 2 a 1 ) + a 1 = n ! + ( n 1 ) ! + + 2 ! + 1 ! . a_n= (a_n - a_{n-1} ) + (a_{n-1} - a_{n-2} ) + \ldots + (a_2 - a_1) + a_1 = n! + (n-1)! + \ldots + 2! + 1 ! .

We check the first few values 1 n 11 1 \leq n \leq 11 , and find that 11 a 4 , a 8 , a 10 , a 11 11 \mid a_4, a_8, a_{10}, a_{11} . For n > 11 n > 11 , since a n = n ! + a n 1 a_n = n! + a_{n-1} , and n ! n! is a multiple of 11, we see by induction that they are all multiples of 11 11 . Hence, only a 1 , a 2 , a 3 , a 5 , a 6 , a 7 , a 9 a_1, a_2, a_3, a_5, a_6, a_7, a_9 are not multiples of 11 11 , so we have to exclude 7 of them. Thus, 993 \boxed{993} numbers are multiples of 11.

Brock Brown
Feb 17, 2015

Using recursive memoization (aka dynamic programming) in Python:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
memo = {1:1, 2:3}
def a(n):
    if n in memo:
        return memo[n]
    memo[n] = (n+1)*a(n-1)-n*a(n-2)
    return memo[n]
count = 0
for i in xrange(1, 1001):
    if a(i) % 11 == 0:
        count += 1
print "Answer:", count

Owen Scott
May 20, 2014

a1 = 1

a2 = 3

a3 = 4(a2) - 3(a1) = 9

a4 = 5(a3) - 4(a2) = 33 = 0 mod 11 (in equation below, I used the mod value since all I care about is if it is divisible by 11)

a5 = 6(a4) - 5(a3) = -45 = -1 mod 11 (I used -1 to keep calc easier)

a6 = 7(a5) - 6(a4) = -7 = 4 mod 11

a7 = 8(a6) - 7(a5) = 39 = 6 mod 11

a8 = 9(a7) - 8(a6) = 22 = 0 mod 11

a9 = 10(a8) - 9(a7) = -54 = 1 mod 11

a10 = 0(a9) - 10(a8) = 0 mod 11 (Note: since it is mod 11, multiplying by 11 is equivalent to multiplying by 0)

a11 = 1(a10) - 0(a9) = 0 mod 11

Now that we have two 0 mod 11 terms in a row, all future terms will now be divisible by 11 since the past two terms will have been divisible by 11.

a4, a8, a10 - a1000 = 1+1+991 terms = 993 terms are divisible by 11

Let Bn= An - A(n-1) So Bn=B(n-1)*n then Bn/B(n-1) = n multiplying all those equations we have Bn/B2=n!/2 but B2=2 then Bn=n! But we have An= Bn+B(n-1)+...+B2+A1=n!+(n-1)!+...+1! Now we observe each k! in Z(11) 1!=1(mod11) 2!=2(mod11) 3!=6(mod11) 4!=2(mod11) 5!=10(mod11) 6!=5(mod11) 7!=2(mod11) 8!=5(mod11) 9!=1(mod11) 10!=10(mod11) So A4, A7 and A10 are divisible by 11. Every k!, k>10, is divisible by 11 so Ai=A10+ 11Ti for some integer Ti, for every i>10. But A10 is divisible by 11 and then every Ai, i>10, is divisible by 11. So the answer is: (1000-11+1)+3=993

James Aaronson
May 20, 2014

We note that the first few values of a n a_n are 1, 3, 9, 0, 10, 4, 6, 0, 1, 0, 0 mod 11. Now that a 10 a_{10} and a 11 a_{11} are both 0, we can see that all subsequent values will be zero, so there are only the above seven values which are nonzero.

This gives 993 which are multiples of 11.

Thomas Baxter
Jul 21, 2013

Claim: If a n 1 , a n 2 a_{n-1},a_{n-2} are both multiples of 11 11 , then so is a n a_n . Proof: Assume a n 1 , a n 2 a_{n-1},a_{n-2} are multiples of 11 11 . Then there exist integers k , l k,l such that a n 1 = 11 k , a n 2 = 11 l a_{n-1}=11k,a_{n-2}=11l .

a n = ( n + 1 ) a n 1 + n a n 2 = ( n + 1 ) ( 11 k ) + n ( 11 l ) = 11 ( n k + k + n l ) a_n=(n+1)a_{n-1}+na_{n-2}=(n+1)(11k)+n(11l)=11(nk+k+nl) By closure of the integers, n k + k + n l nk+k+nl is an integer, so a n a_n is divisible by 11.

Evaluate the first eleven terms: ( 1 , 3 , 9 , 33 , 153 , 873 , 5913 , 46233 , 409113 , 4037913 , 43954713 ) (1,3,9,33,153,873,5913,46233,409113,4037913,43954713) . Modulo 11 11 , the first eleven terms are 1 , 3 , 9 , 0 , 10 , 4 , 6 , 0 , 1 , 0 , 0 1,3,9,0,10,4,6,0,1,0,0 . We then claim that a n a_n is a multiple of 11 11 for all n 10 n\geq 10 , making the inductive proof using n = 10 , 11 n=10,11 as base cases (proof by evaluation) and noting that the inductive step is the first claim, already proven.

Therefore, for n { 1 , . . . , 1000 } n\in\{1,...,1000\} , the only values of n n for which a n a_n is not a multiple of 11 11 must have n < 10 n<10 ; looking at our initial evaluations, we can narrow this down to n { 1 , 2 , 3 , 5 , 6 , 7 , 9 } n\in\{1,2,3,5,6,7,9\} .

There are 7 7 integers values of n n from 1 1 to 1000 1000 inclusive such that a n a_n is not a multiple of 11; therefore, there are 1000 7 = 993 1000-7=993 integer values of n n from 1 1 to 1000 1000 inclusive such that a n a_n is a multiple of 11.

Debjit Mandal
Jul 21, 2013

a {n} - a {n-1}=n(a {n-1} - a {n-2}), a {n-1} - a {n-2}=(n-1)(a {n-2} - a {n-3}), a {n-2} - a {n-3}=(n-2)(a {n-3} - a {n-4}), . . a {3} - a {2}=3(a {2} - a {1})=3(3-1)=3*2, a {2} - a {1}=3-1=2; So, we can easily find that, a {n} - a {n-1} = n!, a {n-1} - a {n-2}=(n-1)!, a {n-2} - a {n-3}=(n-2)!, . . a {3} - a {2}=3!, a {2} - a {1}=2!; By adding these (n-1) equations, all the a {i} 's will be canceled out, where i is a positive integer and 2 \leq i \leq (n-1). So, we shall get, a {n} - a {1} = \displaystyle \sum {j=2}^n j! \Rightarrow a {n}= \displaystyle \sum {j=1}^n j! [where a {1}=1, given]. Note that, 11 divides \displaystyle \sum {j=1}^10 j! and for all positive integer k \geq 11; 11 also divides k!. So, when n \geq 10, a {n} is divisible 11. So, for 10 \leq n \leq 1000, there are 991 such a {n}'s.
Now we just need to find, how many a {n}'s are divisible by 11, for 1 \leq n \leq 9. It is very easy to calculate a {n}, where 1 \leq n \leq 9. Then, we shall find that only a {4} and a {8} are divisible by 11. So, the total number of such a_{n} is (991+2) = 993 [answer]

Ang Yan Sheng
Jul 20, 2013

It can be checked that a 3 4 a 2 3 a 1 9 ( m o d 11 ) a 4 5 a 3 4 a 2 0 ( m o d 11 ) a 5 6 a 4 5 a 3 10 ( m o d 11 ) a 6 7 a 5 6 a 4 4 ( m o d 11 ) a 7 8 a 6 7 a 5 6 ( m o d 11 ) a 8 9 a 7 8 a 6 0 ( m o d 11 ) a 9 10 a 8 9 a 7 1 ( m o d 11 ) a 10 11 a 9 10 a 8 0 ( m o d 11 ) a 11 12 a 10 11 a 9 0 ( m o d 11 ) \begin{aligned} a_3\equiv4a_2-3a_1&\equiv9\pmod{11}\\ a_4\equiv5a_3-4a_2&\equiv0\pmod{11}\\ a_5\equiv6a_4-5a_3&\equiv10\pmod{11}\\ a_6\equiv7a_5-6a_4&\equiv4\pmod{11}\\ a_7\equiv8a_6-7a_5&\equiv6\pmod{11}\\ a_8\equiv9a_7-8a_6&\equiv0\pmod{11}\\ a_9\equiv10a_8-9a_7&\equiv1\pmod{11}\\ a_{10}\equiv11a_9-10a_8&\equiv0\pmod{11}\\ a_{11}\equiv12a_{10}-11a_9&\equiv0\pmod{11} \end{aligned} Also, if a n a n + 1 0 ( m o d 11 ) a_n\equiv a_{n+1}\equiv0\pmod{11} for some integer n n then a n + 2 ( n + 3 ) a n + 1 + ( n + 2 ) a n 0 ( m o d 11 ) a_{n+2}\equiv(n+3)a_{n+1}+(n+2)a_n\equiv0\pmod{11} Thus if P n P_n is the statement that a n a n + 1 0 ( m o d 11 ) a_n\equiv a_{n+1}\equiv0\pmod{11} , then P 10 P_{10} holds and P n P n + 1 P_n\implies P_{n+1} . Therefore P n P_n holds for all n 10 n\geq10 . In particular, this means that 11 divides all a n a_n with n 10 n\geq10 .

Thus for all 1 n 1000 1\leq n\leq1000 , n ∉ { 1 , 2 , 3 , 5 , 6 , 7 , 9 } n\not\in\{1,2,3,5,6,7,9\} , we have 11 a n 11|a_n . Hence there are 1000 7 = 993 1000-7=\boxed{993} values of n n between 1 and 1000 (inclusive) such that 11 a n 11|a_n .

Sanjay Meena
Jul 17, 2013

In a simple way we can write it as

Mod[{Recurrence Table[{a[n] == (n + 1) a[n - 1] - n*a[n - 2],

a[1] == 1, a[2] == 3}, a,

{n, 1000}]}, 11]

use this mathematics code to crack this question easily.....

and check how may zeroes are there ....u will see there are only 7 non zero number and 993 are non zero

so answer is 993

You're not supposed to use programming for these problems.

Michael Tang - 7 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...