Carl Love

Carl Love

25319 Reputation

25 Badges

10 years, 237 days
Himself
Natick, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@pagan I played around a bit with your suggestion. I noticed that the :: syntax can only be used as an argument to showstat (or to its low-level companion debugopts). Thus, it can only be used to view procedures. To view the contents of other module locals, one still needs to use the kernelopts setting. This may be needed to fully understand module code. For example, isprime is implemented as a ModuleApply. After showstat(isprime), we see between statements 6 and 7 that a reference is made to a set special_primes. This is a local of module isprime. (Do eval(isprime) to view the header of isprime as a module.) To view special_primes, do

kernelopts(opaquemodules= false);

eval(isprime:-special_primes);

(The eval is redundant in this case, special_primes being a set; I just include it to cover the other cases.)

This would a good time to mention that one often needs to also issue the command interface(verboseproc= 3) before viewing the code and remember table of a procedure with eval.

@pagan I played around a bit with your suggestion. I noticed that the :: syntax can only be used as an argument to showstat (or to its low-level companion debugopts). Thus, it can only be used to view procedures. To view the contents of other module locals, one still needs to use the kernelopts setting. This may be needed to fully understand module code. For example, isprime is implemented as a ModuleApply. After showstat(isprime), we see between statements 6 and 7 that a reference is made to a set special_primes. This is a local of module isprime. (Do eval(isprime) to view the header of isprime as a module.) To view special_primes, do

kernelopts(opaquemodules= false);

eval(isprime:-special_primes);

(The eval is redundant in this case, special_primes being a set; I just include it to cover the other cases.)

This would a good time to mention that one often needs to also issue the command interface(verboseproc= 3) before viewing the code and remember table of a procedure with eval.

Upload a worksheet with an example.

I agree. Ordering by votes breaks the continuity, making lengthy threads difficult to read.

@pagan Thanks, pagan, for helping me get up to speed on the newer Maple syntax. I'm a few years behind!

@pagan Thanks, pagan, for helping me get up to speed on the newer Maple syntax. I'm a few years behind!

@Eryndis Let me know if you make any progress with those hints or with the exercise about tau(n) being odd.

@Eryndis Let me know if you make any progress with those hints or with the exercise about tau(n) being odd.

@Eryndis Well, tell me what exactly you want. Was I correct in guessing that for each i you want the smallest positive n such that tau(n) = i (a partial inverse of tau)? Would any positive n, not necessarily the smallest, such that tau(n) = i be good enough?

My hint about that line of code was not that you would use it in a program, but that you would use it to understand how tau is computed. Once you know how tau is computed, it should be relatively easy to figure out how to write code for a partial inverse that runs in a short amount of time.

Hint 2: For a bunch of different numbers n, look at ifactors(n) and ifactors(tau(n)). What is the pattern?

Here is a related, but simpler, exercise: What are necessary and sufficient conditions for tau(n) to be odd? This one is a standard in mathematical puzzle collections for the general public, although it is always stated in more fanciful form referring to a long hallway of numbered locker doors or pull-chain lights. See http://www.algebra.com/algebra/homework/word/misc/Miscellaneous_Word_Problems.faq.question.51262.html

@Eryndis Well, tell me what exactly you want. Was I correct in guessing that for each i you want the smallest positive n such that tau(n) = i (a partial inverse of tau)? Would any positive n, not necessarily the smallest, such that tau(n) = i be good enough?

My hint about that line of code was not that you would use it in a program, but that you would use it to understand how tau is computed. Once you know how tau is computed, it should be relatively easy to figure out how to write code for a partial inverse that runs in a short amount of time.

Hint 2: For a bunch of different numbers n, look at ifactors(n) and ifactors(tau(n)). What is the pattern?

Here is a related, but simpler, exercise: What are necessary and sufficient conditions for tau(n) to be odd? This one is a standard in mathematical puzzle collections for the general public, although it is always stated in more fanciful form referring to a long hallway of numbered locker doors or pull-chain lights. See http://www.algebra.com/algebra/homework/word/misc/Miscellaneous_Word_Problems.faq.question.51262.html

Please upload an example.

Do you want to expand for an arbitrary unknown positive integer n, or specific values of n

In order for me to take this product seriously, you'll need to correct the spelling and grammar on the web page that your post linked to (the Maple IDE page, not the YouTube video). I found 11 errors on the first screen alone. I am not used to seeing this shoddiness in MapleSoft promotional materials. If MapleSoft associates themselves with this product, it will damage their reputation.

Does the Maple 16 itself (the final installed application as opposed to the installer) need to be run in the compatibility mode? or is it that only the installer needs to run in compatibility mode and the Maple 16, once installed, can run in full regular Windows 8 (64-bit)?

Does the Maple 16 itself (the final installed application as opposed to the installer) need to be run in the compatibility mode? or is it that only the installer needs to run in compatibility mode and the Maple 16, once installed, can run in full regular Windows 8 (64-bit)?

First 649 650 651 652 653 654 655 Page 651 of 657