MathGroup Archive 2009

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

Search the Archive

Re: Creating a Random Function to Select an Irrational Number

  • To: mathgroup at
  • Subject: [mg102259] Re: Creating a Random Function to Select an Irrational Number
  • From: divisor <congruentialuminaire at>
  • Date: Mon, 3 Aug 2009 05:46:01 -0400 (EDT)
  • References: <h4uf6j$j2q$>

Hello BenT:

If I understand correctly, 2 of those definitions can be implemented


randomIrr1[n_Integer] := Module[
  {a=RandomInteger[n], b=RandomInteger[n], c, d}
  ,  c = First /@ FactorInteger[a];
  d = First /@ FactorInteger[b];
  If[c != d, Log[a, b],(* what to do?? *)0]

and invoking these seems to work:



Note that N[] produces inexact numbers.

Also, note that I have only implemented the MathWorld definitions and
have not proved their irrationality.


Roger Williams
Franklin Laboratory
On Jul 31, 2:57 am, BenT <brt... at> wrote:
> Although Mathematica has built-in functiona to obtain random integers and=
> numbers, I need to select a random irrational number. At this
> webpage,
> several definitions are given for known conditions to create
> irrational numbers, such as
> Numbers of the form n^(1/m) are irrational unless n is the mth power
> of an integer.
> Can anyone define a function to allow a similar capability as Random[]
> in selecting a "member" from the above defined "set" of values, or any
> other of the definitions listed on the same webpage?

  • Prev by Date: Re: error with Sum and Infinity
  • Next by Date: Making a LOOP (DO)
  • Previous by thread: Re: freeing memory used by Import[]
  • Next by thread: Making a LOOP (DO)