20080611, 06:30  #1 
7,193 Posts 
Calculating perfect numbers in Pascal
Hi all i was just wondering if anyone here has ever tried to calculate perfect numbers from scratch in Bloodshed softwares DevPascal. i have been tasked to do this for a college teacher. any help would be appreciated. and the sooner the better.

20080611, 13:01  #2  
Nov 2003
2^{2}×5×373 Posts 
Quote:
"write a program that will find p such that 2^p1 is prime?" Once you have such p, then a perfect number is just (2^p1) * 2^(p1) Hint: this has already been done. Or do you mean "given a list of such p, compute 2^(p1) * (2^p 1)"?? If so, you must again specify what you mean by "compute". Do you mean "calculate the decimal representation"? or "calculate the hex representation"? or "calculate the binary representation"?? [the latter two are trivial]. 

20080611, 13:22  #3  
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
10AF_{16} Posts 
Quote:
I think a better, revised question would be how to write the LL test in Pascal. 

20080612, 13:00  #4 
Feb 2008
32_{10} Posts 
Any program to search for an odd perfect number, if any exist?

20080612, 13:08  #5  
"Ben"
Feb 2007
2·11·163 Posts 
Quote:


20080612, 16:37  #6 
"Phil"
Sep 2002
Tracktown, U.S.A.
3·373 Posts 
My impression of the original poster's request was that this was an assignment in programming rather than a math project. My guess is that the teacher wanted a program, which for each integer input n, computed the sum of proper divisors of n to see if it is equal to n, perhaps contained in a loop incrementing n. This can be done in a very simpleminded (and inefficient) way, or one could apply a bit of math to make the search more efficient. Perhaps the original poster should clarify what is really wanted.

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Odd Perfect Numbers  davar55  Miscellaneous Math  16  20110129 01:53 
Calculating large numbers  Historian  Information & Answers  4  20100326 19:39 
Perfect Numbers  MajUSAFRet  Math  3  20031213 03:55 
Identifing perfect squares and calculating square roots..  dsouza123  Math  2  20030719 17:17 
Odd Perfect Numbers  ZetaFlux  Math  1  20030528 19:41 