login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

Limit of convergents equals zero; only the 6th convergent is indeterminate. Other 2-adic continued fractions of zero are: A118821, A118827, A118830. A006519(n) is the highest power of 2 dividing n; A080277 = partial sums of A038712, where A038712(n) = 2*A006519(n) - 1.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..65537

EXAMPLE

For n >= 1, convergents A118825(k)/A118826(k):

  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.

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

Cf. A006519, A080277; convergents: A118825/A118826; variants: A118821, A118827, A118830; A100338.

Sequence in context: A242753 A232443 A118821 * A209402 A082641 A239140

Adjacent sequences:  A118821 A118822 A118823 * A118825 A118826 A118827

KEYWORD

cofr,sign

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 25 11:15 EDT 2019. Contains 323539 sequences. (Running on oeis4.)