OFFSET
0,2
COMMENTS
The simple continued fraction expansion of 3*tan(1/3) is [1; 25, 1, 3, 1, 61, 1, 7, 1, 97, 1, 11, 1, ..., 36*n + 25, 1, 4*n + 3, 1, ...], while the simple continued fraction expansion of (1/3)*tan(1/3) is [0; 8, 1, 1, 1, 43, 1, 5, 1, 79, 1, 9, 1, 115, 1, 13, 1, ..., 36*n + 7, 1, 4*n + 1, 1, ...]. See my comment in A019425. - Peter Bala, Sep 30 2023
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..20000
Khalil Ayadi, Chiheb Ben Bechir, and Maher Saadaoui, Continued Fractions with Predictable Patterns and Transcendental Numbers, J. Int. Seq. (2025) Vol. 28, Art. No. 25.1.4.
G. Xiao, Contfrac
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
From Bruno Berselli, Sep 21 2012: (Start)
G.f.: x*(2+x+3*x^2-x^3+x^4)/(1-x^2)^2.
a(n) = 2*a(n-2)-a(n-4) with n>4, a(0)=0, a(1)=2, a(2)=1, a(3)=7, a(4)=1.
a(n) = 1+3*(1-(-1)^n)*(n-1)/2 with n>1, a(0)=0, a(1)=2.
For k>0: a(2k) = 1, a(4k+1) = 2*a(2k+1)-1 and a(4k+3) = 2*a(2k+1)+5, with a(0)=0, a(1)=2. (End)
EXAMPLE
0.346253549510575491038543565... = 0 + 1/(2 + 1/(1 + 1/(7 + 1/(1 + ...)))). - Harry J. Smith, Jun 13 2009
MATHEMATICA
ContinuedFraction[Tan[1/3], 80] (* Bruno Berselli, Sep 21 2012 *)
PROG
(PARI) { allocatemem(932245000); default(realprecision, 88000); x=contfrac(tan(1/3)); for (n=0, 20000, write("b019426.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 13 2009
(Magma) [n le 1 select 2*n else 1+3*(1-(-1)^n)*(n-1)/2: n in [0..80]]; // Bruno Berselli, Sep 21 2012
CROSSREFS
KEYWORD
nonn,easy,cofr
AUTHOR
STATUS
approved
