This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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 Index entries for linear recurrences with constant coefficients, signature (0,0,0,-1). FORMULA Period 8 sequence: [ -2,-1,0,-1,2,1,0,1]. G.f. -x*(1+x)*(x^2-x+2) / ( 1+x^4 ). a(n)=1/8*{3*(n mod 8)-[(n+1) mod 8]+[(n+2) mod 8]+[(n+3) mod 8]-3*[(n+4) mod 8]+[(n+5) mod 8]-[(n+6) mod 8]-[(n+7) mod 8]} with n>=0 - Paolo P. Lava, Nov 27 2006 a(n) = sqrt((n+1)^2 mod 8))(-1)^floor((n+3)/4). - Wesley Ivan Hurt, Jan 04 2014 EXAMPLE For n>=1, convergents A118825(k)/A118826(k) are: 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, ... MAPLE A118825:=n->sqrt((n+1)^2 mod 8))*(-1)^floor((n+3)/4); seq(A118825(n), n=1..100); # Wesley Ivan Hurt, Jan 04 2014 MATHEMATICA Table[Sqrt[Mod[(n+1)^2, 8]](-1)^Floor[(n+3)/4], {n, 100}] (* Wesley Ivan Hurt, Jan 04 2014 *) 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 Cf. A118824 (partial quotients), A118826 (denominators), A118822, A230075 (start with a(5)). Sequence in context: A096661 A199339 A323202 * A007877 A098178 A118822 Adjacent sequences:  A118822 A118823 A118824 * A118826 A118827 A118828 KEYWORD frac,sign,easy AUTHOR Paul D. Hanna, May 01 2006 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 19 06:47 EDT 2019. Contains 324218 sequences. (Running on oeis4.)