|
|
A118824
|
|
2-adic continued fraction of zero, where a(n) = -2 if n is odd, A006519(n/2) otherwise.
|
|
6
|
|
|
-2, 1, -2, 2, -2, 1, -2, 4, -2, 1, -2, 2, -2, 1, -2, 8, -2, 1, -2, 2, -2, 1, -2, 4, -2, 1, -2, 2, -2, 1, -2, 16, -2, 1, -2, 2, -2, 1, -2, 4, -2, 1, -2, 2, -2, 1, -2, 8, -2, 1, -2, 2, -2, 1, -2, 4, -2, 1, -2, 2, -2, 1, -2, 32, -2, 1, -2, 2, -2, 1, -2, 4, -2, 1, -2, 2, -2, 1, -2, 8, -2, 1, -2, 2, -2, 1, -2, 4, -2, 1, -2, 2, -2, 1, -2, 16, -2, 1, -2, 2, -2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
at k = 4*n-1: 0.
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[If[OddQ@ #, -2, 2^(IntegerExponent[#, 2] - 1)] &, 102] (* Michael De Vlieger, Nov 06 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
|
|
|
STATUS
|
approved
|
|
|
|