I'm attempting to work out a problem that involves summing a series of numbers. I know the formula to find each element of the series, but I do not know how to use this to make an equation for the series, or find the sum. The equation for each term of the series is this
an=(n∗n+12)mod10
Because of the modulus operator, I'm completely unsure of how to really work with this, as I have little experience with it. I'm not familiar with it beyond knowing what the operation actually does.
Answer
As André Nicolas pointed out in his comment, sequence an is periodic, with period 20.
This can be seen easily: an+20=n2+41n+4202mod10=n(n+1)2mod10+(20n+210)mod10=an+0
(if we want to be formal, we've only proved that the sequence repeats with period 20, but didn't rule out the possibility of it repeating with some smaller period)
Thus, the sum of first M terms of the sequence can be evaluated by looking at blocks of 20 consecutive numbers first (sum of each such block equals 70) and then adding the remaining terms explicitly:
M∑i=0ai=70⌊M20⌋+M mod 20∑i=0ai
Technically, it's possible to find an explicit expression for the latter (finite) sum, but it's most likely going to be rather unwieldy.
No comments:
Post a Comment