|
|
A140160
|
|
a(1)=1, a(n) = a(n-1) + n^4 if n odd, a(n) = a(n-1) + n^3 if n is even.
|
|
2
|
|
|
1, 9, 90, 154, 779, 995, 3396, 3908, 10469, 11469, 26110, 27838, 56399, 59143, 109768, 113864, 197385, 203217, 333538, 341538, 536019, 546667, 826508, 840332, 1230957, 1248533, 1779974, 1801926, 2509207, 2536207, 3459728, 3492496
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
Index entries for linear recurrences with constant coefficients, signature (1,5,-5,-10,10,10,-10,-5,5,1,-1).
|
|
FORMULA
|
G.f.: x*(1 + 8*x + 76*x^2 + 24*x^3 + 230*x^4 - 24*x^5 + 76*x^6 - 8*x^7 + x^8)/((1+x)^5*(x-1)^6). - R. J. Mathar, Feb 22 2009
|
|
MATHEMATICA
|
a = {}; r = 4; 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 (* Artur Jasinski *)
nxt[{n_, a_}]:={n+1, If[EvenQ[n], a+(n+1)^4, a+(n+1)^3]}; NestList[nxt, {1, 1}, 40][[All, 2]] (* or *) LinearRecurrence[{1, 5, -5, -10, 10, 10, -10, -5, 5, 1, -1}, {1, 9, 90, 154, 779, 995, 3396, 3908, 10469, 11469, 26110}, 40] (* Harvey P. Dale, Oct 05 2016 *)
Table[(1/240)*(15*(1 -(-1)^n) - 4*(1 - 15*(-1)^n)*n + 30*(1 + 3(-1)^n)*n^2 + 20*(5 - 3*(-1)^n)*n^3 + 30*(3 - 2*(-1)^n)*n^4 + 24*n^5), {n, 1, 50}] (* G. C. Greubel, Jul 05 2018 *)
|
|
PROG
|
(PARI) for(n=1, 50, print1((1/240)*(15*(1 -(-1)^n) - 4*(1 - 15*(-1)^n)*n + 30*(1 + 3(-1)^n)*n^2 + 20*(5 - 3*(-1)^n)*n^3 + 30*(3 - 2*(-1)^n)*n^4 + 24*n^5), ", ")) \\ G. C. Greubel, Jul 05 2018
(Magma) [(1/240)*(15*(1 -(-1)^n) - 4*(1 - 15*(-1)^n)*n + 30*(1 + 3(-1)^n)*n^2 + 20*(5 - 3*(-1)^n)*n^3 + 30*(3 - 2*(-1)^n)*n^4 + 24*n^5): n in [1..50]]; // G. C. Greubel, Jul 05 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|