login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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 to n, 1/k - sum k=n to n^2, 1/k) and the monotonically decreasing series (sum k=1 to n, 1/k - sum k=n to 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
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, 12, -401, -2, -2, 3, 3, -4, -6, 3, 3, -12, -3, -2, 2, 2, -5, -6 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

Series derived from def. gamma=lim(sum k=1 to n, 1/k - log(n)) by noting that 2*gamma = 2*sum k=1 to n, 1/k -2*log(n) (ignoring limit) and also gamma = sum k=1 to 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.

LINKS

Table of n, a(n) for n=0..42.

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

Cf. A002852.

Sequence in context: A094758 A283971 A100394 * A156671 A072006 A014238

Adjacent sequences:  A178780 A178781 A178782 * A178784 A178785 A178786

KEYWORD

sign

AUTHOR

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

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 5 20:30 EDT 2020. Contains 333260 sequences. (Running on oeis4.)