![]() |
![]() |
#1 |
2,953 Posts |
![]()
Hi all i was just wondering if anyone here has ever tried to calculate perfect numbers from scratch in Bloodshed softwares Dev-Pascal. i have been tasked to do this for a college teacher. any help would be appreciated. and the sooner the better.
|
![]() |
![]() |
#2 | |
Nov 2003
22×5×373 Posts |
![]() Quote:
"write a program that will find p such that 2^p-1 is prime?" Once you have such p, then a perfect number is just (2^p-1) * 2^(p-1) Hint: this has already been done. Or do you mean "given a list of such p, compute 2^(p-1) * (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]. |
|
![]() |
![]() |
![]() |
#3 | |
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
17·251 Posts |
![]() Quote:
I think a better, revised question would be how to write the LL test in Pascal. |
|
![]() |
![]() |
![]() |
#4 |
Feb 2008
25 Posts |
![]()
Any program to search for an odd perfect number, if any exist?
|
![]() |
![]() |
![]() |
#5 | |
"Ben"
Feb 2007
336110 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#6 |
"Phil"
Sep 2002
Tracktown, U.S.A.
2·13·43 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 simple-minded (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 | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Odd Perfect Numbers | davar55 | Miscellaneous Math | 16 | 2011-01-29 01:53 |
Calculating large numbers | Historian | Information & Answers | 4 | 2010-03-26 19:39 |
Perfect Numbers | MajUSAFRet | Math | 3 | 2003-12-13 03:55 |
Identifing perfect squares and calculating square roots.. | dsouza123 | Math | 2 | 2003-07-19 17:17 |
Odd Perfect Numbers | Zeta-Flux | Math | 1 | 2003-05-28 19:41 |