The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A140161 a(1)=1, a(n) = a(n-1) + n^4 if n odd, a(n) = a(n-1) + n^5 if n is even. 2
 1, 33, 114, 1138, 1763, 9539, 11940, 44708, 51269, 151269, 165910, 414742, 443303, 981127, 1031752, 2080328, 2163849, 4053417, 4183738, 7383738, 7578219, 12731851, 13011692, 20974316, 21364941, 33246317, 33777758, 50988126 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Harvey P. Dale, 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 From Paolo P. Lava, Jun 06 2008: (Start) a(n) = a(n-1) + ((1 - (-1)^n)/2)*n^4 + ((1 + (-1)^n)/2)*n^5, with a(1)=1. a(n) = -1/8 + (1/4)*(-1)^n*n + (1/8)*(-1)^n - (1/2)*(-1)^n*n^3 + (1/6)*n^3 - (5/8)*(-1)^n*n^2 - (1/24)*n^2 - (1/60)*n + (1/12)*n^6 + (1/4)*(-1)^n*n^5 + (7/20)*n^5 + (3/8)*(-1)^n*n^4 + (11/24)*n^4, with n >= 1. (End) G.f.: x*(-1 - 32*x - 75*x^2 - 832*x^3 - 154*x^4 - 2112*x^5 + 154*x^6 - 832*x^7 + 75*x^8 - 32*x^9 + x^10)/((1+x)^6*(x-1)^7). - R. J. Mathar, Feb 22 2009 MATHEMATICA a = {}; r = 4; s = 5; 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 *) next[{a_, b_}]:={a+1, If[OddQ[a+1], b+(a+1)^4, b+(a+1)^5]}; Transpose[ NestList[ next[#]&, {1, 1}, 30]][[2]] (* Harvey P. Dale, Nov 23 2011 *) Table[(1/120)*(15*(-1 +(-1)^n) - 2*(1 -15*(-1)^n)*n - 5*(1 +15*(-1)^n)*n^2 + 20*(1 -3*(-1)^n)*n^3 + (55 + 45*(-1)^n)*n^4 + (42 +30*(-1)^n)*n^5 + 10*n^6), {n, 1, 50}] (* G. C. Greubel, Jul 05 2018 *) PROG (PARI) for(n=1, 50, print1((1/120)*(15*(-1 +(-1)^n) - 2*(1 -15*(-1)^n)*n - 5*(1 +15*(-1)^n)*n^2 + 20*(1 -3*(-1)^n)*n^3 + (55 + 45*(-1)^n)*n^4 + (42 +30*(-1)^n)*n^5 + 10*n^6), ", ")) \\ G. C. Greubel, Jul 05 2018 (MAGMA) [(1/120)*(15*(-1 +(-1)^n) - 2*(1 -15*(-1)^n)*n - 5*(1 +15*(-1)^n)*n^2 + 20*(1 -3*(-1)^n)*n^3 + (55 + 45*(-1)^n)*n^4 + (42 +30*(-1)^n)*n^5 + 10*n^6): n in [1..50]]; // G. C. Greubel, Jul 05 2018 CROSSREFS Cf. A000027, A000217, A000330, A000537, A000538, A000539, A136047, A140113. Sequence in context: A198291 A044284 A044665 * A177211 A337626 A301633 Adjacent sequences:  A140158 A140159 A140160 * A140162 A140163 A140164 KEYWORD nonn AUTHOR Artur Jasinski, May 12 2008 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 30 06:28 EST 2021. Contains 349419 sequences. (Running on oeis4.)