OFFSET
1,1
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
EXAMPLE
at k = 4*n: -1/A080277(n);
at k = 4*n+1: -2/(2*A080277(n)-1);
at k = 4*n+2: -1/(A080277(n)-1);
at k = 4*n-1: 0/(-1)^n.
Convergents begin:
2/1, -1/-1, 0/-1, -1/1, -2/1, 1/0, 0/1, 1/-4,
2/-7, -1/3, 0/-1, -1/5, -2/9, 1/-4, 0/1, 1/-12,
2/-23, -1/11, 0/-1, -1/13, -2/25, 1/-12, 0/1, 1/-16,
2/-31, -1/15, 0/-1, -1/17, -2/33, 1/-16, 0/1, 1/-32, ...
MATHEMATICA
Array[-2^(IntegerExponent[#, 2] - 1) /. -1/2 -> 2 &, 96] (* Michael De Vlieger, Nov 02 2018 *)
PROG
(PARI) a(n)=local(p=+2, q=-1); if(n%2==1, p, q*2^valuation(n/2, 2))
CROSSREFS
KEYWORD
cofr,sign
AUTHOR
Paul D. Hanna, May 01 2006
STATUS
approved