cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A094964 A continued fraction transformation of Pi.

This page as a plain text file.
%I A094964 #16 May 17 2019 17:18:09
%S A094964 3,8,2,8,6,5,6,1,6,2,0,5,1,1,7,6,3,4,9,2,1,6,8,0,7,8,5,8,1,2,3,2,7,1,
%T A094964 5,3,8,3,4,1,3,8,0,6,0,0,7,6,7,2,4,7,4,6,7,8,8,4,6,4,8,6,7,7,0,9,9,4,
%U A094964 9,4,2,0,3,6,6,3,5,2,0,7,5,2,6,0,3,7,1,1,5,0,4,1,8,0,7,0,0,9,2,7,6,8,0,0,4
%N A094964 A continued fraction transformation of Pi.
%C A094964 The number, C, has the continued fraction which is the decimal expansion of Pi.
%e A094964 C = 3.828656162...
%t A094964 RealDigits[ FromContinuedFraction[ RealDigits[Pi, 10, 125][[1]]], 10, 111][[1]]
%o A094964 (PARI) extractDigits(x,{basis=10}) = { local(d); d=[floor(x)]; x = basis*(x - floor(x)); for (i=1,ceil(precision(x)*log(10)/log(basis))+5, d = concat(d, floor(x)); x = basis*(x - floor(x)); ); return(d); }
%o A094964 continuedFraction(digs) = { local(rtn,n,first); rtn = 0; for (i=0,#digs-1, n = digs[ #digs - i]; if (n, first = i; rtn = n; break; ); ); for (i=first+1,#digs-1, rtn = digs[ #digs - i] + 1/rtn; ); return(rtn); }
%o A094964 \p 1000
%o A094964 continuedFraction(extractDigits(Pi,10))+0. \\ Olivier Favre (of.olivier.favre(AT)gmail.com), Mar 01 2010
%Y A094964 Cf. A000796.
%K A094964 cons,easy,nonn,base
%O A094964 1,1
%A A094964 _Robert G. Wilson v_, May 26 2004