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!)
A140149 a(1)=1, a(n)=a(n-1)+n^2 if n odd, a(n)=a(n-1)+ n^3 if n is even. 1
1, 9, 18, 82, 107, 323, 372, 884, 965, 1965, 2086, 3814, 3983, 6727, 6952, 11048, 11337, 17169, 17530, 25530, 25971, 36619, 37148, 50972, 51597, 69173, 69902, 91854, 92695, 119695, 120656, 153424, 154513, 193817, 195042, 241698, 243067 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
From R. J. Mathar, Feb 22 2009: (Start)
G.f.: x*(-1-8*x-5*x^2-32*x^3+5*x^4-8*x^5+x^6)/((1+x)^4*(x-1)^5).
a(n) = a(n-1)+4*a(n-2)-4*a(n-3)-6*a(n-4)+6*a(n-5)+4*a(n-6)-4*a(n-7)-a(n-8)+a(n-9). (End)
MATHEMATICA
a = {}; r = 2; 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*)
CROSSREFS
Sequence in context: A255839 A361082 A166640 * A197345 A186951 A176201
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 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)