Recurring Styles #1 - Direct Parametric Recurrence!

Algebra Level 5

a n + 1 = 2 a n n 2 + n \large{a_{n+1} = 2a_n - n^2 + n}

Define a sequence a n a_n that satisfy the recurrence relation as described above, with a 1 = 3 a_1 = 3 . Find the value of a 20 a 15 18133 \dfrac{ |a_{20} - a_{15} | }{18133} .

Bonus : Generalize this for all values of a n a_n .


The answer is 28.

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.

5 solutions

Satyajit Mohanty
Jul 9, 2015

I solved the same way :)

Ronak Agarwal - 5 years, 11 months ago

Log in to reply

Congratulations. You are smart, indeed :D

Satyajit Mohanty - 5 years, 11 months ago

Log in to reply

What's the source of the problem. If you love recurrences then you should try this

@Satyajit Mohanty

Ronak Agarwal - 5 years, 11 months ago

Log in to reply

@Ronak Agarwal I too don't remember my sources. I solve many subjective Olympiad level problems usually. I just twist these problems to make it an Integer-Type !

Satyajit Mohanty - 5 years, 11 months ago

Some mistakes but at third attempt i did it !

Anish Harsha - 5 years, 10 months ago

I there any systematic method to solve recurrence relations of the type f ( a n , a n 1 , , a 0 ) = p ( n ) f(a_n,a_{n-1},\cdots,a_0)=p(n) where f f and p p are polynomial functions?

Deeparaj Bhat - 5 years, 2 months ago

First, evaluate a 0 a_{0} : a 1 = 2 a 0 a 0 = 3 2 a_{1} = 2a_{0} \Rightarrow a_{0} = \frac{3}{2}

Then, use Z-transform: a n + 1 2 a n + n 2 n = 0 a_{n+1} - 2a_{n} + n^2 - n = 0

z ( A ( z ) a 0 ) 2 A ( z ) + z ( z + 1 ) ( z 1 ) 3 z ( z 1 ) 2 = 0 z(\mathbf{A}(z)-a_{0}) - 2\mathbf{A}(z) + \dfrac{z(z+1)}{(z-1)^3} - \dfrac{z}{(z-1)^2} = 0

A ( z ) = z ( 3 z 3 9 z 2 + 9 z 7 ) 2 ( z 2 ) ( z 1 ) 3 \Rightarrow \mathbf{A}(z) = \dfrac{z(3z^3 -9z^2 + 9z - 7)}{2(z-2)(z-1)^3}

A ( z ) = z ( 3 z 3 9 z 2 + 9 z 7 ) 2 ( z 2 ) ( z 1 ) 3 \Rightarrow \mathbf{A}(z) = \dfrac{z(3z^3 -9z^2 + 9z - 7)}{2(z-2)(z-1)^3}

A ( z ) = 2 z z 1 + z ( z 1 ) 2 + z ( z + 1 ) ( z 1 ) 3 z 2 ( z 2 ) \Rightarrow \mathbf{A}(z) = \dfrac{2z}{z-1} + \dfrac{z}{(z-1)^2} + \dfrac{z(z+1)}{(z-1)^3} - \dfrac{z}{2(z-2)}

Working in the inverse of the Z-transform: a n = 2 + n + n 2 2 n 1 \boxed{a_{n} = 2 + n + n^2 - 2^{n-1}}

Now: a 20 = 422 2 19 a_{20} = 422-2^{19} ; a 15 = 242 2 14 a_{15} = 242-2^{14} ;

a 20 a 15 18133 = 2 19 2 14 + 180 18133 = 28 \dfrac{\left\vert a_{20} - a_{15} \right\vert}{18133} = \dfrac{2^{19} - 2^{14} + 180}{18133} = \boxed{\boxed{28}}

I came to learn about z-transform after this solution :)

Satyajit Mohanty - 5 years, 11 months ago

Log in to reply

So I think it worthed posting it.

Z-transform is a great tool for solving difference equations.

Juan Vidal Flores Apaza - 5 years, 11 months ago

Log in to reply

Can you solve this problem : Recurring Styles #2 using Z-transform?

Satyajit Mohanty - 5 years, 11 months ago

Log in to reply

@Satyajit Mohanty After doing b n = ln ( a n ) b_{n} = \ln(a_{n}) , of course.

Solved.

Juan Vidal Flores Apaza - 5 years, 11 months ago

Log in to reply

@Juan Vidal Flores Apaza Can you post your solution there. People will learn a new solution to that problem :)

Satyajit Mohanty - 5 years, 11 months ago
Bill Bell
Jul 10, 2015

Brute force

Slightly more subtlety

We see that the 3rd and higher differences assume the pattern characteristic of an exponential function. Hence, this is part of the required solution (but not all of it). Accordingly, I remove a convenient exponential component from the terms and recalculate.

And this reveals the remaining quadratic component. We can therefore model the required solution as,

r 2 n + s n 2 + t n + u = a n r{ 2 }^{ n }+s{ n }^{ 2 }+tn+u={ a }_{ n }

substitute values for n n and a n { a }_{ n } and solve for the required constants.

r=-1/2, s=1, t=1, u=2

This is correct now.

I cannot independently verify your solution, as I have a little knowledge of programming. @Pranjal Jain , will you help me get this solution verified?

Satyajit Mohanty - 5 years, 11 months ago

Log in to reply

Apologies, I suppose I must have copied the coefficients from the wrong place.

Bill Bell - 5 years, 11 months ago

By the way, I can atleast say that your final expression for a n a_n seems incorrect. Please re-check it.

Satyajit Mohanty - 5 years, 11 months ago

Why use generator when you can use a list?

Pranjal Jain - 5 years, 11 months ago

Log in to reply

Lists use space for each entry and are inherently finite. A generator can produce a finite number of results or (potentially) an infinite number. They can also be made more easily read, and might be capable of more for a given level of complexity.

Bill Bell - 5 years, 11 months ago

Log in to reply

I just created the list while len(list_name)<21. Anyway, thanks for introducing generators. I knew about them but I tend not to use them. ¨ \ddot\smile

Pranjal Jain - 5 years, 11 months ago

Log in to reply

@Pranjal Jain In the end, it's possible that I just like them. ;)

Bill Bell - 5 years, 11 months ago

You mean n 2 + 3 n + 4 2 n n^2+3n+4-2^n ? In that case, a 1 3 a_1≠3

Pranjal Jain - 5 years, 11 months ago

Log in to reply

I think you'll find that the expression given now does yield 3 for n=1.

Bill Bell - 5 years, 11 months ago

f=lambda n:(-1./2)*2 n+n 2+n+2

f(1)

3

Bill Bell - 5 years, 11 months ago
Viki Zeta
Oct 21, 2016

Python

values = {1:3}

def a(n):
    if n not in values:
        m = n-1
        x = 2 * a(m)
        x -= m**2
        x += m

        values[n] = x
        return values[n]
    else:
        return values[n]

print abs(a(20)-a(15))/18133.0
Karan Siwach
Sep 17, 2015

include<stdio.h>

include <stdlib.h>

long int series(int n)

{

if (n==1){return 3;}else{


        long int t=series(n-1);


long int f=2*series(n-1)-((n-1)*(n-1))+(n-1);


return f;


}

}

int main()

{

int i;

scanf("%d",&i);


long int f;f=series(i+5);


long int k;k=series(i);


double p=0;p=(double)f-(double)k;


if(p>0){printf("%f",p/18133);}else


    {printf("%f",-p/18133);}


return 0;

}

NOTE : C language

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...