login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A178783 Continued fraction for Euler-Mascheroni constant with convergents 0/1, 1/1, 1/2, 4/7, etc., which lie between the monotonically increasing series given by (Sum_{k=1..n} 1/k - Sum_{k=n..n^2} 1/k) and the monotonically decreasing series (Sum_{k=1..n} 1/k - Sum_{k=n..n^2-1} 1/k), both of which converge to gamma. Thus each p/q in the sequence lies within 1/q^2 of gamma. 0

%I #16 Jun 25 2021 23:15:16

%S 0,1,1,3,-4,-5,3,13,5,2,-10,-3,4,2,-42,-12,3,8,-9,-2,6,-50,5,-67,-5,7,

%T 12,-401,-2,-2,3,3,-4,-6,3,3,-12,-3,-2,2,2,-5,-6

%N Continued fraction for Euler-Mascheroni constant with convergents 0/1, 1/1, 1/2, 4/7, etc., which lie between the monotonically increasing series given by (Sum_{k=1..n} 1/k - Sum_{k=n..n^2} 1/k) and the monotonically decreasing series (Sum_{k=1..n} 1/k - Sum_{k=n..n^2-1} 1/k), both of which converge to gamma. Thus each p/q in the sequence lies within 1/q^2 of gamma.

%C Series derived from def. gamma = lim(Sum_{k=1..n} 1/k - log(n)) by noting that 2*gamma = 2*Sum_{k=1..n} 1/k - 2*log(n) (ignoring limit) and also gamma = Sum_{k=1..n^2} 1/k - log(n^2), then gamma = 2*gamma - gamma gets rid of the log term and the series consists of all rational terms. The decreasing series was found by accident. The proofs for both are straightforward. The PARI program uses the first term of the Euler-Maclaurin summation and gamma itself for the upper and lower bounds.

%o (PARI) pconv=vector(43); qconv=vector(43); cf=vector(43); fract=vector(43); pconv[1]=0; pconv[2]=1; pconv[3]=1; pconv[4]=4; qconv[1]=1; qconv[2]=1; qconv[3]=2; qconv[4]=7; cf[1]=0; cf[2]=1; cf[3]=1; cf[4]=3; fract[1]=0/1; fract[2]=1/1; fract[3]=1/2; fract[4]=4/7; for(k=5,43, tst=0; cfm=1; until(tst==1, pp = cfm * pconv[k - 1] + pconv[k - 2]; pn = cfm * pconv[k - 1] - pconv[k - 2]; qp = cfm * qconv[k - 1] + qconv[k - 2]; qn = cfm * qconv[k - 1] - qconv[k - 2]; slp = pp/qp; sln = pn/qn; if(((Euler - slp < 2/(3 * qp^2) && Euler - slp > 0) ||

%o (slp - Euler < 1/(3 * qp^2) && slp - Euler > 0)) || ((Euler - sln < 2/(3 * qn^2) && Euler - sln > 0) || (sln - Euler < 1/(3 * qn^2) && sln - Euler > 0)), pconv[k] = ((Euler - slp < 2/(3 * qp^2) && Euler - slp > 0) || (slp - Euler < 1/(3 * qp^2) && slp - Euler > 0))*pp + ((Euler - sln < 2/(3 * qn^2) && Euler - sln > 0) || (sln - Euler < 1/(3 * qn^2) && sln - Euler > 0))*pn; qconv[k] = ((Euler - slp < 2/(3 * qp^2) && Euler - slp > 0) ||

%o (slp - Euler < 1/(3 * qp^2) && slp - Euler > 0))*qp + ((Euler - sln < 2/(3 * qn^2) && Euler - sln > 0) || (sln - Euler < 1/(3 * qn^2) && sln - Euler > 0))*qn; fract[k] = pconv[k]/qconv[k]; cf[k] = ((Euler - slp < 2/(3 * qp^2) && Euler - slp > 0) || (slp - Euler < 1/(3 * qp^2) && slp - Euler > 0))*cfm - ((Euler - sln < 2/(3 * qn^2) && Euler - sln > 0) || (sln - Euler < 1/(3 * qn^2) && sln - Euler > 0))*cfm; tst = 1, cfm = cfm + 1)); write("eulwritefile.txt","Convergents: ",fract); write("eulwritefile.txt","continued fraction: ",cf); write("eulwritefile.txt","sln: ",sln); write("eulwritefile.txt","slp: ",slp))

%Y Cf. A002852.

%K sign

%O 0,4

%A Joseph G. Johnson (jjohnson1253(AT)hotmail.com), Jun 12 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:01 EDT 2024. Contains 371967 sequences. (Running on oeis4.)