OFFSET
0,4
COMMENTS
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.
PROG
(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) ||
(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) ||
(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))
CROSSREFS
KEYWORD
sign
AUTHOR
Joseph G. Johnson (jjohnson1253(AT)hotmail.com), Jun 12 2010
STATUS
approved