OFFSET
0,3
LINKS
FORMULA
G.f.: (1+2*x+2*x^2)*(1+x^2)/(1+x)^2/(1-x).
a(n^2-n+2) = A118403(n).
a(2n) = 2n+1, a(2n+1) = 3-2n, n>0. - Ralf Stephan, Aug 18 2013
a(n) = (5+(-1)^n*(2*n-3))/2 for n>1. - Peter Luschny, Aug 04 2014
MAPLE
a := n -> `if`(n=1, 1, (5+(-1)^n*(2*n-3))/2);
seq(a(n), n=0..70); # Peter Luschny, Aug 04 2014
MATHEMATICA
Join[{1, 1}, LinearRecurrence[{-1, 1, 1}, {3, 1, 5}, 70]] (* Jean-François Alcover, Jun 13 2019 *)
PROG
(PARI) {a(n)=polcoeff((1+2*x+2*x^2)*(1+x^2)/(1+x+x*O(x^n))^2/(1-x), n, x)}
CROSSREFS
KEYWORD
sign
AUTHOR
Paul D. Hanna, Apr 27 2006
STATUS
approved