OFFSET
1,2
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
EXAMPLE
at k = 4*n: 1/(2*A080277(n));
at k = 4*n+1: 1/(2*A080277(n)-1);
at k = 4*n+2: 1/(2*A080277(n)-2);
at k = 4*n-1: 0.
Convergents begin:
-1/1, -1/2, 0/-1, -1/-2, 1/1, 1/0, 0/1, 1/8,
-1/-7, -1/-6, 0/-1, -1/-10, 1/9, 1/8, 0/1, 1/24,
-1/-23, -1/-22, 0/-1, -1/-26, 1/25, 1/24, 0/1, 1/32,
-1/-31, -1/-30, 0/-1, -1/-34, 1/33, 1/32, 0/1, 1/64, ...
MATHEMATICA
Array[If[OddQ@ #, -1, 2^IntegerExponent[#, 2]] &, 99] (* Michael De Vlieger, Nov 06 2018 *)
PROG
(PARI) a(n)=local(p=-1, q=+2); if(n%2==1, p, q*2^valuation(n/2, 2))
CROSSREFS
KEYWORD
cofr,sign
AUTHOR
Paul D. Hanna, May 01 2006
STATUS
approved