login
A265078
Partial sums of A072154.
2
1, 4, 9, 16, 25, 37, 52, 69, 88, 109, 133, 160, 189, 220, 253, 289, 328, 369, 412, 457, 505, 556, 609, 664, 721, 781, 844, 909, 976, 1045, 1117, 1192, 1269, 1348, 1429, 1513, 1600, 1689, 1780, 1873, 1969, 2068, 2169, 2272, 2377, 2485, 2596, 2709, 2824, 2941, 3061, 3184, 3309, 3436, 3565, 3697
OFFSET
0,2
FORMULA
G.f.: (1+x)^2*(1-x+x^2)*(1+x+x^2) / ((1-x)^3*(1+x+x^2+x^3+x^4)).
a(n) = 2*a(n-1) - a(n-2) + a(n-5) - 2*a(n-6) + a(n-7). - Vincenzo Librandi, Jan 01 2016
MATHEMATICA
LinearRecurrence[{2, -1, 0, 0, 1, -2, 1}, {1, 4, 9, 16, 25, 37, 52}, 60] (* Vincenzo Librandi, Jan 01 2016 *)
PROG
(PARI) Vec((1+x)^2*(1-x+x^2)*(1+x+x^2)/((1-x)^3*(1+x+x^2+x^3+x^4)) + O(x^70)) \\ Colin Barker, Jan 01 2016
(Magma) I:=[1, 4, 9, 16, 25, 37, 52]; [n le 7 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-5)-2*Self(n-6)+Self(n-7): n in [1..60]]; // Vincenzo Librandi, Jan 01 2016
CROSSREFS
Cf. A072154.
Sequence in context: A254073 A075056 A022779 * A266782 A008105 A008089
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 29 2015
STATUS
approved