[seqfan] Re: Using "Quiet" in Mathematica: Quiet or Quit?

mathstutoring mathstutoring at ntlworld.com
Sun Feb 19 16:00:44 CET 2012


Hi Harvey

Is this any good to you?

Select[Range[12500], !IntegerQ[Sqrt[#]] && Count[Last[ContinuedFraction[Sqrt[#]]],1]?27 &]



Ant King (UK)


----- Original Message ----- 
From: "Harvey P. Dale" <hpd1 at nyu.edu>
To: "zak seidov" <zakseidov at yahoo.com>
Cc: <seqfan at list.seqfan.eu>
Sent: Sunday, February 19, 2012 2:43 PM
Subject: [seqfan] Re: Using "Quiet" in Mathematica: Quiet or Quit?


Zak:
Mathematica now has a command called Quiet that is different than Quit.  I'm using Mathematica 8.
Best,
Harvey

-----Original Message-----
From: zak seidov [mailto:zakseidov at yahoo.com] 
Sent: Sunday, February 19, 2012 9:35 AM
To: Harvey P. Dale
Subject: Re: [seqfan] Using "Quiet" in Mathematica: Quiet or Quit?



Sorry, Harvey,
do yo mean Quit[]?
In my M5.2, I don't have Quiet.
Thanks,
Zak

---- Original Message -----
> From: Harvey P. Dale <hpd1 at nyu.edu>
> To: Sequence Fanatics Discussion list <seqfan at list.seqfan.eu>
> Cc: 
> Sent: Saturday, February 18, 2012 8:26 PM
> Subject: [seqfan] Using "Quiet" in Mathematica
> 
> I would like guidance, and perhaps a consensus or rule, about 
> whether and when to use "Quiet" in Mathematica programs in the OEIS.
> Here's an example: A031795 lists numbers such that there are 
> exactly 27 occurrences of the digit 1 in the period of the continued 
> fraction of the square root of the number. In Mathematica, it is easy 
> to generate the terms of the period of the continued fraction -- 
> ContinuedFraction[Sqrt[n]][[2]] does that. It is also easy to count 
> the number of ones in that period, using Count. The problem is that 
> every number that is a perfect square causes an error message to be 
> generated since there is no period of the continued fraction for the 
> square root of a perfect square.
> There are two ways to deal with this. One is simply to wrap the 
> Mathematica program inside "Quiet." The second is to write a program 
> that avoids the error messages, in this case by separately testing for 
> perfect-square status. I chose the latter for the program I submitted 
> for A031795. But there are two problems with this choice:
> (1) it makes the program more opaque to the readers of the OEIS and 
> (2) it takes additional time to write such an error-code-avoiding program.
> (Indeed, in some instances I am not readily able to figure out how to 
> avoid the error messages and so cannot easily write a program that 
> avoids their generation.)
> Using Quiet to eliminate the error messages, however, might be 
> dangerous because some of the messages generated might be material, 
> e.g., they might deal with precision errors or erroneous terms being 
> generated.
> I would assume that no one would want to use Quiet when its effect 
> might be to pollute the accuracy of the OEIS. The question really is: 
> if it appears clear that the error messages being generated are not of 
> the dangerous variety, should Quiet be permitted in lieu of having to 
> figure out and submit what will always be a more complex Mathematica 
> program?
> I would appreciate guidance.
> Best,
> Harvey
> 
> _______________________________________________
> 
> Seqfan Mailing list - http://list.seqfan.eu/
> 

_______________________________________________

Seqfan Mailing list - http://list.seqfan.eu/


More information about the SeqFan mailing list