# GATE | GATE-CS-2016 (Set 1) | Question 37

Consider the recurrence relation a1 = 8, an = 6n2 + 2n + an-1. Let a99 = k x 104. The value of K is _____

(A) 190
(B) 296
(C) 198
(D) 200

Explanation: a1 = 8
an = 6n2 + 2n + an-1

an = 6[n2 + (n-1)2] + 2[n + (n-1)] + an-2

Continuing the same way till n=2, we get
an = 6[n2 + (n-1)2 + (n-2)2 + … + (2)2] + 2[n + (n-1) + (n-2) + … + (2)] + a1

an = 6[n2 + (n-1)2 + (n-2)2 + … + (2)2] + 2[n + (n-1) + (n-2) + … + (2)] + 8

an = 6[n2 + (n-1)2 + (n-2)2 + … + (2)2] + 2[n + (n-1) + (n-2) + … + (2)] + 6 + 2

an = 6[n2 + (n-1)2 + (n-2)2 + … + (2)2 + 1] + 2[n + (n-1) + (n-2) + … + (2) + 1]

an = (n)*(n+1)*(2n+1) + (n)(n+1) = (n)*(n+1)*(2n+2)

an = 2*(n)*(n+1)*(n+1) = 2*(n)*(n+1)2

Now, put n=99.
a99 = 2*(99)*(100)2 = 1980000 = K * 104
Therefore, K = 198.

Thus, C is the correct choice.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.