[go: up one dir, main page]

login
A006083
Continued fraction for e/2.
(Formerly M0125)
5
1, 2, 1, 3, 1, 1, 1, 3, 3, 3, 1, 3, 1, 3, 5, 3, 1, 5, 1, 3, 7, 3, 1, 7, 1, 3, 9, 3, 1, 9, 1, 3, 11, 3, 1, 11, 1, 3, 13, 3, 1, 13, 1, 3, 15, 3, 1, 15, 1, 3, 17, 3, 1, 17, 1, 3, 19, 3, 1, 19, 1, 3, 21, 3, 1, 21, 1, 3, 23, 3, 1, 23, 1, 3, 25, 3, 1, 25, 1, 3, 27, 3, 1, 27, 1, 3, 29, 3, 1, 29, 1, 3, 31, 3
OFFSET
1,2
REFERENCES
D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 2, p. 601.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
a(1)=1, a(2)=2, a(3)=1, a(4)=3, a(5)=1, a(6)=1, a(7)=1, a(8)=3, then for k>=1 a(6*k+3)=a(6*k+6)=2*k+1, a(6*k+4)=a(6*k+8)=3, a(6*k+5)=a(6*k+7)=1. - Benoit Cloitre, Apr 08 2003
From Colin Barker, May 16 2016: (Start)
a(n) = a(n-3)+a(n-6)-a(n-9) for n>9.
G.f.: x*(1+2*x+x^2+2*x^3-x^4-3*x^6+x^8-x^10) / ((1-x)^2*(1+x)*(1-x+x^2)*(1+x+x^2)^2).
(End)
EXAMPLE
1.359140914229522617680143735... = 1 + 1/(2 + 1/(1 + 1/(3 + 1/(1 + ...)))). - Harry J. Smith, May 10 2009
MATHEMATICA
ContinuedFraction[E/2, 94] (* Jean-François Alcover, Apr 01 2011 *)
Join[{1, 2}, LinearRecurrence[{0, 0, 1, 0, 0, 1, 0, 0, -1}, {1, 3, 1, 1, 1, 3, 3, 3, 1}, 92]] (* Ray Chandler, Sep 03 2015 *)
PROG
(PARI) { allocatemem(932245000); default(realprecision, 55000); x=contfrac(exp(1)/2); for (n=1, 20000, write("b006083.txt", n, " ", x[n])); } \\ Harry J. Smith, May 10 2009
(PARI) Vec(x*(1+2*x+x^2+2*x^3-x^4-3*x^6+x^8-x^10) / ((1-x)^2*(1+x)*(1-x+x^2)*(1+x+x^2)^2) + O(x^50)) \\ Colin Barker, May 16 2016
CROSSREFS
Cf. A019739 = Decimal expansion. - Harry J. Smith, May 10 2009
Sequence in context: A362681 A320077 A325522 * A338713 A080301 A326674
KEYWORD
cofr,nonn,easy
EXTENSIONS
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 20 2003
STATUS
approved