login
A226279
a(4n) = a(4n+2) = 2*n , a(4n+1) = a(4n+3) = 2*n-1.
1
0, -1, 0, -1, 2, 1, 2, 1, 4, 3, 4, 3, 6, 5, 6, 5, 8, 7, 8, 7, 10, 9, 10, 9, 12, 11, 12, 11, 14, 13, 14, 13, 16, 15, 16, 15, 18, 17, 18, 17, 20, 19, 20, 19, 22, 21, 22, 21, 24, 23, 24, 23, 26, 25, 26, 25, 28, 27, 28, 27, 30, 29, 30, 29
OFFSET
0,5
COMMENTS
a(n)=c(n) in A214297(n).
In A214297 d(n)=-1,1,1,3,1,3,3,... = mix (-A186422(2n) , A186422(2n+1)).
A214297 is the (reduced) numerator of 1/4 - 1/A061038(n).
(i.e. (1/4 -(1/0, 1/4, 1, 1/36, 1/16,...)) = -1/0, 0/1, -3/4, 2/9, 3/16,... )
1/0 is a convention.
n^2=(a(n+1)+d(n+1))^2 are the denominators.
FORMULA
a(0) = a(2)=0, a(1)=a(3)=-1, a(4)=2.
a(n) = a(n-4) + 2, n > 3.
a(n) = a(n-1) + a(n-4) - a(n-5), n > 4.
A214297(n) = a(n+1) * d(n+1).
G.f.: x*(3*x^3-x^2+x-1) / ((x-1)^2*(x+1)*(x^2+1)). - Colin Barker, Sep 22 2013
MATHEMATICA
Table[{0, -1} + 2*Floor[n/2], {n, 0, 31}] // Flatten (* Jean-François Alcover, Jun 03 2013 *)
PROG
(PARI) a(n)=n\4*2-n%2 \\ Charles R Greathouse IV, Sep 15 2013
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Jun 02 2013
STATUS
approved