Chiaki is interested in an infinite sequence a_1,a_2,a_3,..., which is defined as follows:
a_n={1 a_n−a_n−1+a_n−1−a_n−2n=1,2n≥3
Chiaki would like to know the sum of the first n terms of the sequence, i.e. ∑_i=1na_i. As this number may be very large, Chiaki is only interested in its remainder modulo (109+7).