A sequence of integers is defined as follows:  \(a_i = i\) for \(1 \)\(\le i \le 5,\) and \(a_i = a_1 a_2 \dotsm a_{i - 1} - 1\) for \(i > 5\)




 Evaluate \(a_1 a_2 \dotsm a_{2011} - \sum_{i = 1}^{2011} a_i^2\)



So for this question, the first step I took was recognizing that \(a_1 a_2 \dotsm a_{2011} = a_{2012}+1\)



Additionally, for i > 5,  \(a_{n+1} = {a_n}^2+a_n-1\) through some algebraic manipulation. 




Moving terms of the equation to one side, it follows that \(a_{n+1} -a_n+1= {a_n}^2\)




Thus, \(a_1 a_2 \dotsm a_{2011} - \sum_{i = 1}^{2011} a_i^2\) would be equal to \(a_1 a_2 \dotsm a_{2011} - \sum_{i = 1}^{2011} a_{n+1}-a_n+1\).  From this, we have a telescoping series for all terms after a_6, as \(a_1, a_2, a_3, a_4, a_5\) do not follow this pattern.  



After writing it all out, we find that the sequence \( \sum_{i = 1}^{2011} a_{n+1}-a_n+1\) simplifies to \(a_1^2+a_2^2+a_3^2+a_4^2+a_5^2\)+\(a_{2012}-a_6+2006\)



This is equal to \(55-(5!-1)+a_{2012}+2006\).  Plugging this into the original sequence, we have it equal to


\(a_{2012}+1-(55-(5!-1)+a_{2012}+2006)\), simplifying to


\(1-55+(5!-1)-2006\), or \(719-2060\) or \(-1341\).  



I am very grateful for any responses that I get, this is my last attempt at this question, so I really hope I can get it right (if I do not, I have to do many more questions to compensate lol).  



Thank you so much!

 Jun 9, 2021

Everything looks right to me.  Good job!

 Jun 9, 2021






It turns out, 5!-1 is not 719, but in fact 119.  

 Jun 14, 2021

34 Online Users