login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140162 a(1)=1, a(n) = a(n-1) + n^5 if n odd, a(n) = a(n-1) + n^0 if n is even. 2
1, 2, 245, 246, 3371, 3372, 20179, 20180, 79229, 79230, 240281, 240282, 611575, 611576, 1370951, 1370952, 2790809, 2790810, 5266909, 5266910, 9351011, 9351012, 15787355, 15787356, 25552981, 25552982, 39901889, 39901890, 60413039 (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 - 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
Sequence in context: A013505 A013478 A049333 * A145712 A259141 A065664
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 02:46 EDT 2024. Contains 371917 sequences. (Running on oeis4.)