This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A228826 Delayed continued fraction of sqrt(2). 4
 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS See A228825 for a definition of delayed continued fraction (DCF). DCF(r) is periodic if and only if CF(r) is periodic; DCF(sqrt(n)) is shown here for selected values of n,using Mathematica notation for periodic continued fractions. n ........ DCF(sqrt(n)) 2 ........ {2, {-1,-2,1,2}} 3 ........ {{1,2,-1,-1,-2,1}} 5 ........ {3, {-2,2,-1,-2,2,-2,1,2}} 6 ........ {3, {-1,-2,2,-2,1,2}} 7 ........ {2, {1,1,2,-2,2,-1,-1,-1,-1,-2,2,-2,1,1}} 8 ........ {2, {2,-2,2,-1,-1,-2,2,-2,1,1}} 10........ {4, {-2,2,-2,2,-1,-2,2,-2,2,-2,1,2}} LINKS G. C. Greubel, Table of n, a(n) for n = 0..1000 Index entries for linear recurrences with constant coefficients, signature (0,-1). FORMULA From Colin Barker, Sep 13 2013: (Start) a(n) = ((2-i)*(-i)^n + (2+i)*i^n)/2 where i=sqrt(-1). a(n) = -a(n-2). G.f.: (2-x)/(x^2+1). (End) EXAMPLE convergents: 2, 1, 4/3, 3/2, 10/7, 7/5, 24/17, 17/12, 58/41, 41/29, 140/99, ... MATHEMATICA \$MaxExtraPrecision = Infinity; x[0] = Sqrt[2]; s[x_] := s[x] = If[FractionalPart[x] < 1/2, Ceiling[x], Floor[x]]; a[n_] := a[n] = s[Abs[x[n]]]*Sign[x[n]]; x[n_] := 1/(x[n - 1] - a[n - 1]); t = Table[a[n], {n, 0, 100}] LinearRecurrence[{0, -1}, {2, -1}, 50] (* G. C. Greubel, Aug 19 2018 *) PROG (PARI) Vec(-(x-2)/(x^2+1) + O(x^100)) \\ Colin Barker, Sep 13 2013 (MAGMA) I:=[2, -1]; [n le 2 select I[n] else  - Self(n-2): n in [1..30]]; // G. C. Greubel, Aug 19 2018 CROSSREFS Cf. A133570, A228825 Sequence in context: A262352 A167964 A280193 * A288699 A168361 A107393 Adjacent sequences:  A228823 A228824 A228825 * A228827 A228828 A228829 KEYWORD cofr,sign,easy AUTHOR Clark Kimberling, Sep 04 2013 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 September 19 23:31 EDT 2019. Contains 327207 sequences. (Running on oeis4.)