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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140157 a(1)=1, a(n) = a(n-1) + n^4 if n odd, a(n) = a(n-1) + n^0 if n is even. 2
1, 2, 83, 84, 709, 710, 3111, 3112, 9673, 9674, 24315, 24316, 52877, 52878, 103503, 103504, 187025, 187026, 317347, 317348, 511829, 511830, 791671, 791672, 1182297, 1182298, 1713739, 1713740, 2421021, 2421022, 3344543, 3344544, 4530465 (list; graph; refs; listen; history; text; internal format)
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,5,-5,-10,10,10,-10,-5,5,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), with a(1)=1.

a(n) = -1/4 + (1/4)*(-1)^n*n + (1/4)*(-1)^n - (1/2)*(-1)^n*n^3 + (1/6)*n^3 + (29/60)*n + (1/10)*n^5 - (1/4)*(-1)^n *n^4 + (1/4)*n^4, with n >= 1. (End)

G.f.: x*(1 + x + 76*x^2 - 4*x^3 + 230*x^4 + 6*x^5 + 76*x^6 - 4*x^7 + x^8 + x^9)/((1+x)^5*(x-1)^6). - R. J. Mathar, Feb 22 2009

MATHEMATICA

a = {}; r = 4; 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, 5, -5, -10, 10, 10, -10, -5, 5, 1, -1}, {1, 2, 83, 84, 709, 710, 3111, 3112, 9673, 9674, 24315}, 50] (* or *) Table[(1/60)*(15*(-1 + (-1)^n) + (29 +15*(-1)^n)*n + 10*(1 -3*(-1)^n)*n^3 + 15*(1 -(-1)^n)*n^4 + 6*n^5), {n, 1, 50}] (* G. C. Greubel, Jul 05 2018 *)

PROG

(PARI) for(n=1, 50, print1((1/60)*(15*(-1 + (-1)^n) + (29 +15*(-1)^n)*n + 10*(1 -3*(-1)^n)*n^3 + 15*(1 -(-1)^n)*n^4 + 6*n^5), ", ")) \\ G. C. Greubel, Jul 05 2018

(MAGMA) [(1/60)*(15*(-1 + (-1)^n) + (29 +15*(-1)^n)*n + 10*(1 -3*(-1)^n)*n^3 + 15*(1 -(-1)^n)*n^4 + 6*n^5): n in [1..50]]; // G. C. Greubel, Jul 05 2018

CROSSREFS

Cf. A000027, A000217, A000330, A000537, A000538, A000539, A136047, A140113.

Sequence in context: A063270 A087617 A263365 * A285689 A139867 A260674

Adjacent sequences:  A140154 A140155 A140156 * A140158 A140159 A140160

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 18 23:44 EDT 2021. Contains 348071 sequences. (Running on oeis4.)