Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Peculiar behaviour of Mathematica code

  • To: mathgroup at
  • Subject: [mg57929] Peculiar behaviour of Mathematica code
  • From: "Tony King" <mathstutoring at>
  • Date: Mon, 13 Jun 2005 05:50:46 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

I have some Mathematica code which I borrowed from the Divisors package.
This code should return True if its argument is semiperfect and False if it 
is not.

Here is the code




This seems to work fine if the argument is composite. However, if the input 
is prime it returns {False} rather than False.

Similarly the code for returning True if a number is weird behaves in the 
same way



Any ideas how these codes could be modified to return False (rather than 
{False}) for prime inputs

Thank you


  • Prev by Date: Re: Beginner's Question on I/O Files for Raw Numerical Data
  • Next by Date: Text Manipulation
  • Previous by thread: where's DrBob's web site now?
  • Next by thread: Re: Peculiar behaviour of Mathematica code