|
%I
%S 8,908,328184,69004076,11556327260,1707243198956,237064232862404,
%T 31153163750203064,3947120494191630260,486665774050923191336,
%U 58727077924545848315800
%N Sum of the first 10^n twin primes.
%C The Gcc/Gmp program is at the bottom of the page in the link. The page also
%C has the PARI bisection algorithms which give a very good approximation for the
%C n-th prime number and the n-th lower twin prime number. The first 5 terms can be
%C computed from the PARI script although 11556327260 takes 4 hours on a 2.53ghz
%C 2 gig ram p4.
%H Cino Hilliard, <a href="http://groups.google.com/group/sumprimes/web/sumtwinsfirstn-c">Counting and summing primes</a>
%e The 10^0-th twin prime pair is (3,5). This adds up to 8, the first entry
%e in the sequence. The first 10^1 twin prime pairs are (3,5),(5,7),(11,13)
%e (17,19),(29,31),(41,43),(59,61),(71,73),(101,103),(107,109). This adds up to
%e 908, the second entry in the table.
%o (PARI) default(primelimit,4200000000)
%o for(j=0,4,print1(tws(10^j)","))
%o tws(n) = y=sum(x=1,n,twinl(x));(y+n)*2
%o twinl(n) = local(c, x); c=0;x=1;while(c<n,if(ispseudoprime(prime(x)+2),c++);
%o x++;);return(prime(x-1))
%Y Cf. A118552
%K nonn
%O 0,1
%A Cino Hilliard (hillcino368(AT)hotmail.com), Oct 31 2008
|