MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Listing

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34149] RE: [mg34114] Listing
  • From: "Higinio Ramos" <higra at usal.es>
  • Date: Mon, 6 May 2002 05:20:21 -0400 (EDT)
  • References: <200205040828.EAA01737@smc.vnet.net>
  • Reply-to: "Higinio Ramos" <higra at usal.es>
  • Sender: owner-wri-mathgroup at wolfram.com

Maybe this does what you want:

inteValues[y_,n_,m_]:=(list={};
    Do[If[IntegerQ[(x^2-1)/y^2],list=Append[list,{x,(x^2-1)/y^2}],
        Continue],{x,n,m}];list)
Example: for x in the range {1,60} and for y=3 we obtain:

inteValues[3,1,60]

{{1,0},{8,7},{10,11},{17,32},{19,40},{26,75},{28,87},{35,136},{37,152},{44,
    215},{46,235},{53,312},{55,336}}

Higinio
----- Original Message -----
From: Mr Burgers <ab106 at pixie.co.za>
To: mathgroup at smc.vnet.net
Subject: [mg34149] [mg34114] Listing


> I am working on a project investigating the Pell equation x^2-d*y^2=1,
where
> I calculate the values of d keeping y constant and determining the
periodic
> behaviour of x and d. I have found using Mathematica most useful to find
the
> integer values of x and d. However, when I use
Table[{(x^2-1)/y^2},{x,n,m}],
> it lists all the rational fractions over the complete range of n to m
which
> I choose, where I am interested only in getting the Integer values of x
and
> d while y is kept constant for one set of calculations.
> I wonder if it is possible for someone to advise me on how I must change
my
> Table listing to only give the Integer values of x and d. I have tried
> several changes but none worked.
> Alfonso Burgers
>
>
>
>



  • References:
    • Listing
      • From: "Mr Burgers" <ab106@pixie.co.za>
  • Prev by Date: Re: Help for Mathematica
  • Next by Date: Re: Hypergeometric rational/real discrepancy (bug?)
  • Previous by thread: Listing
  • Next by thread: Re: Listing