Brun's constant (WP 34S)  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: Brun's constant (WP 34S) (/thread236473.html) 
Brun's constant (WP 34S)  Gerson W. Barbosa  12242012 In 1919 the Norwegian mathematician Viggo Brun proved that the sum of the reciprocals of the twin primes (pair of prime numbers which differ by 2) converges to a finite value now known as Brun's constant (B_{2}). Unlike some constants related to divergent sums of reciprocals of integers, like the EulerMascheroni constant (harmonic series) and Mertens constant (prime numbers), which are respectively known to millions and thousands of digits, the Brun's constant is known to 9 or 10 digits only. The sum converges very slowly, so slowly that the sum will not reach the value 1.9 until all the reciprocals of the twin prime pairs up to 10^{530} are summed up. Thus, an indirect method is used, assuming the Twin Prime Conjecture is true: B^{*}_{2} = B_{2(p)} + 4*C_{2}/log(p)where B_{2(p)} = sum of the reciprocals of the twin prime pairs up to p B^{*}_{2} has been calculated for p up to 10^{15} and 10^{16} by Thomas R. Nicely (1999) and Pascal Sebah (2012), respectively: http://www.trnicely.net/twins/twins2.html http://numbers.computation.free.fr/Constants/Primes/twin.pdf By the way, the famous Pentium bug was discovered by Dr. Nicely in 1994 when calculating B_{2} for p up to 10^{14}. Let's now compute a the constant to a few digits on the WP34S:
001 LBL A 018 x<>yThe most accurate value of B_{2} to date is 1.902160583104 from which the last two or three digits are uncertain. Now let's find a couple of suitable approximations:
On squaring 1.902160583104we get 3.61821488391Notice the three digits after the decimal point resemble those of the goldenratio. Let's add 2 to the builtin Phi constant: 1.61803398875Let's divide the value obtained earlier by this one: / >Not bad! But there's more. Let's take the square of B_{2} again 3.61821488391and divide it by the goldenratio: 1.61803398875Notice this is close to the square root of 5. So, let's square it: 2.23617977686One 9 better! These allow for the following nice approximations:
B_{2} ~ Sqrt(1.00005*(Phi + 2)) = 1.90216058482and B_{2} ~ Sqrt(Phi*Sqrt(5.0005)) = 1.90216058363 The latter is a great mnemonic aid: Phi, a constant related to the square root of 5, and a 5digit number, beginning and ending with 5 and zeroes in the middle. P.S.: No bugs were found on the WP34S when running the above program :) 
P.S.: Some optimization: _{Edited to add P.S.}
Edited: 1 Jan 2013, 7:19 p.m. after one or more responses were posted
Re: Brun's constant (WP 34S)  Paul Dale  12242012 Not all that relevant to the discussion but this was one of the constants that didn't make it into the 34S constant table :) There were others.
Re: Brun's constant (WP 34S)  Gerson W. Barbosa  12242012 What about an efficient NEXTTP function on the next WP43S? :)
Gerson.
Re: Brun's constant (WP 34S)  Paul Dale  12242012 Just do it as user code. NEXTP is a keystroke program on the 34S after all :)
