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
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for 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, May 08 2008
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[EvenQ[n], a+n+1, a+(n+1)^2]}; Transpose[ NestList[ nxt, {1, 1}, 50]][[2]] (* or *) LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {1, 5, 8, 24, 29, 65, 72}, 50] (* Harvey P. Dale, Jul 22 2014 *)
CoefficientList[Series[(- 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), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 23 2014 *)
PROG
(PARI) print1(a=1); for(n=2, 99, print1(", ", a+=n^(2-n%2))) \\ Charles R Greathouse IV, Jul 19 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Artur Jasinski, May 08 2008
STATUS
approved