Sigui (an) la successió definida per an = n2 − (n−1)2 ,
i la successió de les seves sumes parcials Sn = ∑i = 1nai.
Entrada
L’entrada consisteix en diversos casos. Cada cas consisteix en un enter positiu 1 ≤ n ≤ 1018
Sortida
Per a cada cas, escriviu el valor de Sn mod (109 + 7)
About statements
The official statement of a problem is always the one
in the PDF document. The HTML version of the statement
is also given to help you, but may contain some content
that is not well displayed. In case of doubt, always use the PDF.