login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140113 a(1)=1, a(n)=a(n-1)+n if n odd, a(n)=a(n-1)+ n^2 if n is even. 28
1, 5, 8, 24, 29, 65, 72, 136, 145, 245, 256, 400, 413, 609, 624, 880, 897, 1221, 1240, 1640, 1661, 2145, 2168, 2744, 2769, 3445, 3472, 4256, 4285, 5185, 5216, 6240, 6273, 7429, 7464, 8760, 8797, 10241, 10280, 11880, 11921, 13685, 13728, 15664, 15709 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

One notices the powers 8, 256, 400, and 2744 (14^3) and wonders if the sum is ever again a power.  [J. M. Bergot, Sep 07 2011]

LINKS

Index to sequences with linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).

FORMULA

O.g.f.: (-x^4 + 4*x^3 + 4*x + 1)/(x^7 - x^6 - 3*x^5 + 3*x^4 + 3*x^3 - 3*x^2 - x + 1) - Alexander R. Povolotsky (pevnev(AT)juno.com), May 08 2008

a(n)=a(n-1)+{[1-(-1)^n]/2}+{[1+(-1)^n]/2}*n^4, with a(1)=1 a(n)=(1/8)-(1/8)*(-1)^n+(1/6)*n^3+(1/4)*(-1)^n*n^2+(1/2)*n^2+(1/3)*n, with n>=1 - Paolo P. Lava (paoloplava(AT)gmail.com), Jun 06 2008

MATHEMATICA

a = {}; Do[k = 0; Do[k = k + (Sin[Pi m/2]^2) m + (Cos[Pi m/2]^2) m^2, {m, 1, n}]; AppendTo[a, k], {n, 1, 100}]; a (*Artur Jasinski*)

PROG

(PARI) print1(a=1); for(n=2, 99, print1(", ", a+=n^(2-n%2))) \\ Charles R Greathouse IV, Jul 19 2011

CROSSREFS

Cf. A136047.

Sequence in context: A192651 A105963 A169701 * A166652 A025623 A069959

Adjacent sequences:  A140110 A140111 A140112 * A140114 A140115 A140116

KEYWORD

nonn,easy

AUTHOR

Artur Jasinski (grafix(AT)csl.pl), May 08 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 18:43 EST 2012. Contains 205939 sequences.