2 Replies - 1656 Views - Last Post: 20 September 2012 - 05:01 AM

#1 captainhampton   User is offline

  • Jawsome++;
  • member icon

Reputation: 14
  • View blog
  • Posts: 548
  • Joined: 17-October 07

Quasiperfect Number

Posted 15 September 2010 - 10:29 AM

Description: Call the function for a range of values to search. If the function returns true, you have found such a number.Quasiperfect numbers are only theorized to exist. Use this program as a template to find one!
# A quasiperfect number is a theoretical natural number n for which the sum
# of all its divisors is equal to 2n+1. No quasiperfect numbers have been
# found so far, but if one exists it must be an odd square number > 10^35.
# Author : Vincent Russo

def QuasiPerfect(n):
	divisors = []
	for i in range(n):
		if i % n == 0:
			divisors.append(i)
	quas = sum(divisors)
	
	if quas == 2 * n + 1:
		return True
	return False

for i in range (1,10000):
	if QuasiPerfect(i) == True:
		print i, " is a quasiperfect number."


Is This A Good Question/Topic? 0
  • +

Replies To: Quasiperfect Number

#2 cyberhacker   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 20-September 12

Re: Quasiperfect Number

Posted 20 September 2012 - 04:59 AM

ISn't 1,2&4 are quaziperfect numbers??
Was This Post Helpful? 0
  • +
  • -

#3 captainhampton   User is offline

  • Jawsome++;
  • member icon

Reputation: 14
  • View blog
  • Posts: 548
  • Joined: 17-October 07

Re: Quasiperfect Number

Posted 20 September 2012 - 05:01 AM

No. http://en.wikipedia....iperfect_number For more thorough information as to why they are not, check out this paper: http://matwbn.icm.ed...aa22/aa2245.pdf
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1