OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1, 6, -6, -15, 15, 20, -20, -15, 15, 6, -6, -1, 1).
FORMULA
G.f.: x*(-1 - x - 237*x^2 + 5*x^3 - 1682*x^4 - 10*x^5 - 1682*x^6 + 10*x^7 - 237*x^8 - 5*x^9 - x^10 + x^11)/((1+x)^6*(x-1)^7). - R. J. Mathar, Feb 22 2009
MATHEMATICA
a = {}; r = 5; s = 0; Do[k = 0; Do[k = k + (Sin[Pi m/2]^2) m^r + (Cos[Pi m/2]^2) m^s, {m, 1, n}]; AppendTo[a, k], {n, 1, 100}]; a (* Artur Jasinski *)
LinearRecurrence[{1, 6, -6, -15, 15, 20, -20, -15, 15, 6, -6, -1, 1}, {1, 2, 245, 246, 3371, 3372, 20179, 20180, 79229, 79230, 240281, 240282, 611575}, 40] (* Harvey P. Dale, Apr 21 2011 *)
PROG
(PARI) for(n=1, 50, print1((1/24)*(3*(-1 +(-1)^n) + 12*n + (-1 +15*(-1)^n)*n^2 + 5*(1 -3* (-1)^n)*n^4 - 6*(-1 +(-1)^n)*n^5 + 2*n^6), ", ")) \\ G. C. Greubel, Jul 05 2018
(Magma) [(1/24)*(3*(-1 +(-1)^n) + 12*n + (-1 +15*(-1)^n)*n^2 + 5*(1 -3* (-1)^n)*n^4 - 6*(-1 +(-1)^n)*n^5 + 2*n^6): n in [1..50]]; // G. C. Greubel, Jul 05 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, May 12 2008
STATUS
approved