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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228935 a(n) = (3 - 6*n)*(-1)^n. 2
0, 3, -9, 15, -21, 27, -33, 39, -45, 51, -57, 63, -69, 75, -81, 87, -93, 99, -105, 111, -117, 123, -129, 135, -141, 147, -153, 159, -165, 171, -177, 183, -189, 195, -201, 207, -213, 219, -225, 231, -237, 243, -249, 255, -261, 267, -273, 279, -285, 291 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Optimal simple continued fraction (with signed denominators) of tan(1/3).

This expansion is a simple continued fraction a(0) + 1/(a(1) + 1/(a(2) + ...)) with all numerators 1, and the numbers a(n) are signed integers computed with an algorithm that guarantees the fastest convergence for this type of continued fraction.

The algorithm is the same described in A133593. It is as usually based on the Euclidean division algorithm, but instead of taking the floor of the quotients, as it happens for standard continued fractions, the nearest integer is taken, so the remainders can be also negative and the quotients also.

Generally the convergents of this expansion are a subset of the convergents of the standard continued fraction expansion, and they are no more alternatively lesser and greater than the given number: in this special case of tan(1/3) they are all lesser.

The terms of this sequence can be generated by this formula: a(n) = -3*(-1)^n*(2n-1) for n > 0 (the first term is a(0)=0).

Repeating the expansion for other numbers of type 1/k a common pattern seems to emerge. Examples:

tan(1/4) gives 0, 4, -12, 20, -28, 36, -44, 52, -60, 68, -76, 84, ...

tan(1/5) gives 0, 5, -15, 25, -35, 45, -55, 65, -75, 85, -95, 105, ...

so it seems that in general the terms of tan(1/k) are generated by the formula a(n) = (-1)^(n+1)*k*(2n-1) for n > 0. This formula gives this expansion for tan(1/k):

tan(1/k) = 1/(k+1/(-3k+1/(5k-1/(-7k+1/(9k+1/...))))).

This expansion can be rewritten in an equivalent form:

tan(1/k) = 1/(k-1/(3k-1/(5k-1/(7k-1/(9k-1/...))))).

The rule for converting the first form to the second is this: if two consecutive terms have different sign put a minus before the fraction line, otherwise put plus, and take the absolute value of the terms in the denominators.

This general expansion seems to be valid for any real value of k and resembles Lambert's expansion of tan(k).

The unsigned version of this sequence is A016945. - Colin Barker, Oct 26 2013

LINKS

Table of n, a(n) for n=0..49.

Index entries for linear recurrences with constant coefficients, signature (-2,-1).

FORMULA

a(n) = A016945(n-1)*(-1)^(n-1).

Formulae for the general case tan(1/k):

a(0)=0; for n > 0, a(n) = (-1)^(n+1)*k*(2n-1).

tan(1/k) = 1/(k + 1/(-3k + 1/(5k - 1/(-7k + 1/(9k + 1/...))))) or equivalently

tan(1/k) = 1/(k - 1/(3k - 1/(5k - 1/(7k - 1/(9k - 1/...))))).

From Colin Barker, Oct 26 2013: (Start)

a(n) = -2*a(n-1) - a(n-2) for n > 2.

G.f.: 3*x*(1-x) / (x+1)^2. (End)

EXAMPLE

tan(1/3) = 0 + 1/(3 + 1/(-9 + 1/(15 + 1/(-21 + 1/(27 + ...))))) or

tan(1/3) = 0 + 1/(3 - 1/(9 - 1/(15 - 1/(21 - 1/(27 - ...))))).

MAPLE

SCF := proc (n, q::posint)::list; local L, i, z; Digits := 10000; L := [round(n)]; z := n; for i from 2 to q do if z = op(-1, L) then break end if; z := 1/(z-op(-1, L)); L := [op(L), round(z)] end do; return L end proc

SCF(tan(1/3), 50)  # Giovanni Artico , Oct 26 2013

MATHEMATICA

Join[{0}, LinearRecurrence[{-2, -1}, {3, -9}, 50]] (* Harvey P. Dale, Mar 10 2015 *)

PROG

(PARI) Vec(3*x*(1-x)/(x+1)^2+O(x^100)) \\ Colin Barker, Oct 26 2013

CROSSREFS

Cf. A016945, A133593, A228936.

Sequence in context: A029506 A030594 A032676 * A016945 A222640 A110108

Adjacent sequences:  A228932 A228933 A228934 * A228936 A228937 A228938

KEYWORD

sign,cofr,easy

AUTHOR

Giovanni Artico, Oct 25 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 17 02:02 EDT 2018. Contains 316275 sequences. (Running on oeis4.)