|
|
A135099
|
|
a(1)=1, a(n) = a(n-1) + n^5 if n odd, a(n) = a(n-1) + n^3 if n is even.
|
|
2
|
|
|
1, 9, 252, 316, 3441, 3657, 20464, 20976, 80025, 81025, 242076, 243804, 615097, 617841, 1377216, 1381312, 2801169, 2807001, 5283100, 5291100, 9375201, 9385849, 15822192, 15836016, 25601641, 25619217, 39968124, 39990076, 60501225
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
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 + 8*x + 237*x^2 + 16*x^3 + 1682*x^4 - 48*x^5 + 1682*x^6 + 16*x^7 + 237*x^8 + 8*x^9 + x^ 10)/((1+x)^6 * (x-1)^7). - R. J. Mathar, Feb 22 2009
E.g.f.: (1/48)*( (-9 - 18*x - 306*x^2 + 468*x^3 - 150*x^4 + 12*x^5)*exp(-x) + (9 + 48*x + 456*x^2 + 768*x^3 + 396*x^4 + 72*x^5 + 4*x^6)*exp(x) ). - G. C. Greubel, Sep 23 2016
|
|
MATHEMATICA
|
a = {}; r = 5; s = 3; 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
Table[(1/48)*(9*(1 - (-1)^n) + 4*n^2*(n + 1)^2*(n^2 + n + 1) - 6*(-1)^n*n^2*(n + 2)*(2*n^2 + n - 4)), {n, 1, 50}] (* G. C. Greubel, Sep 23 2016 *)
nxt[{n_, a_}]:={n+1, If[EvenQ[n], a+(n+1)^5, a+(n+1)^3]}; NestList[nxt, {1, 1}, 30][[All, 2]] (* or *) LinearRecurrence[{1, 6, -6, -15, 15, 20, -20, -15, 15, 6, -6, -1, 1}, {1, 9, 252, 316, 3441, 3657, 20464, 20976, 80025, 81025, 242076, 243804, 615097}, 30] (* Harvey P. Dale, Oct 02 2022 *)
|
|
PROG
|
(PARI) for(n=1, 50, print1((1/48)*(9*(1-(-1)^n) +4*n^2*(n+1)^2*(n^2 +n +1) -6*(-1)^n*n^2*(n+2)*(2*n^2 +n-4)), ", ")) \\ G. C. Greubel, Jul 05 2018
(Magma) [(1/48)*(9*(1-(-1)^n) +4*n^2*(n+1)^2*(n^2 +n+1) -6*(-1)^n*n^2*(n + 2)*(2*n^2 +n-4)): n in [1..50]]; // G. C. Greubel, Jul 05 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|