Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A133593
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A133593 "Exact" continued fraction for Pi. +0
2
3, 7, 16, -294, 3, -4, 5, -15, -3, 2, 2, 2, 2, 3, -85, -3, 2, 15, 3, 14, -5, -2, -6, -6, -100, 3, 2, 6, 3, 6, -2, -6, -9, 9, -3, -3, -8, 4, -2, -13, 3, -5, 2, 9, -2, -3, 8, -2, -5, -2, -2, -4, 3, 4, 4, 17, -162, -46, 24, -3, -3, 6, -3, -25, 4, -5, 4, -2, -10, -2, -5, -5, 3, 2, 9, -6, -2, -2, -27, 6, -2, -8, -2, -42, -3, 8, 3, 4, -2, -7, -2, -4 (list; graph; listen)
OFFSET

0,1

COMMENT

If we use "closest integer function" instead of the common practice of using Floor(x) when calculating continued fractions, we obtain a sequence of (not just positive but also occasionally negative) integers which approximate the original number better "per term" in the sequence. I call such continued fractions as "exact".

For instance 3+1/(7+1/16)=3.14159292, 3+1/(7+1/15)=3.141509434;

3+1/(7+1/(16+1/(-294+1/3)))=3.141592653619, 3+1/(7+1/(15+1/(1+1/292)))=3.141592653012;

It is easy to see that as long as the fractional part of x(n) is in [0, 0.5) usual continued fraction and exact continued fraction agree in terms, but whenever fractional part of x(n) gets to be in (0.5, 1) then exact continued fraction gives better approximations more and more at each term.

Another example is that, exact continued fraction of golden ratio is 2,-3,3,-3,3,... which gives better approximations for any same amount of initial terms when compared to the usual 1,1,1,...

For |x|>2, ECF(1/x) = [0, ECF(x)].

ECF(sqrt(3))=2,-4,4,-4,4,...

ECF(1/sqrt(3))=1,-2,-3,4,-4,4,-4, ...

ECF(-x) is just ECF(x) with signs reversed.

x(n)-a(n) is in [ -0.5, 0.5 ], hence for n>0, |a(n)| >= 2.

FORMULA

x(0)=Pi, a(n) = floor(|x(n)| + 0.5 ) * sign(x(n)), x(n+1) = 1/(x(n)-a(n)).

PROGRAM

High precision arithmetic with GMP 4.2.2, using 10k decimal digits of Pi which is obtained from internet.

CROSSREFS

Cf. A001203.

Sequence in context: A005312 A143817 A000963 this_sequence A087749 A140863 A076194

Adjacent sequences: A133590 A133591 A133592 this_sequence A133594 A133595 A133596

KEYWORD

cofr,sign

AUTHOR

Serhat Sevki Dincer (jfcgauss(AT)gmail.com), Dec 27 2007, Dec 30 2007, Jan 31 2008

page 1

Search completed in 0.004 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 4 20:00 EST 2008. Contains 151309 sequences.


AT&T Labs Research