|
|
A118825
|
|
Numerators of the convergents of the 2-adic continued fraction of zero given by A118824.
|
|
4
|
|
|
-2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
Period 8 sequence: [ -2,-1,0,-1,2,1,0,1].
G.f.: -x*(1+x)*(x^2-x+2) / ( 1+x^4 ).
|
|
EXAMPLE
|
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, ...
|
|
MAPLE
|
|
|
MATHEMATICA
|
Table[Sqrt[Mod[(n+1)^2, 8]](-1)^Floor[(n+3)/4], {n, 100}] (* Wesley Ivan Hurt, Jan 04 2014 *)
PadRight[{}, 120, {-2, -1, 0, -1, 2, 1, 0, 1}] (* Harvey P. Dale, May 26 2020 *)
|
|
PROG
|
(PARI) {a(n)=local(p=-2, q=+1, v=vector(n, i, if(i%2==1, p, q*2^valuation(i/2, 2)))); contfracpnqn(v)[1, 1]}
|
|
CROSSREFS
|
|
|
KEYWORD
|
frac,sign,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|