New sequences

Thomas Baruchel tbaruchel at free.fr
Sat Dec 10 14:12:26 CET 2005


On Ven, déc 09, 2005 at 09:14:36 +0100, Thomas Baruchel wrote:
> On Ven, déc 09, 2005 at 04:30:07 +0100, Tautócrona wrote:
> > in Pari-GP (it would be easier if I knew how to make forprime to run
> > backwards) and doing it "by hand" is a bit nasty if we want to fill three or
> > four lines of accurate digits in 
> 
> You don't need to run backward :
> m=[1,0;0,1];forprime(k=1,1000,m=m*[k,1;1,0]);m[1,1]/m[2,1]+.
> will give you 2.3130367364335829063839 (which is the inverse of your
> > [0,2,3,5,...,19] = 0.4323320871859025970563837017   )

And a third message : since you use Pari-GP, you should look very
carefully at the function contfracpnqn :
  k=contfracpnqn(vector(100,n,prime(n)));k[2,1]/k[1,1]+.
will print your value (but it only works with simple continued
fractions). But of course this built-in function only performs the
very same task at what is described previously.

Regards,

-- 
Thomas Baruchel
  Home Page: http://baruchel.free.fr/~thomas/





More information about the SeqFan mailing list