## anonymous 4 years ago What is the third perfect number? Please help me understand how it works. thnx

1. Hero

1^2 = 1 2^2 = 4 3^2 = 9 The third perfect number is 9? Did you mean perfect SQUARES?

2. anonymous

ohh, no, ummm, like the first number is 6, the second is 28, and idk what the third is...plus idk how to get the number

3. anonymous

Aperfect number is a positive integer that is equal to the sum of its proper positive divisors. Mathematically, $$\sigma_1(N)=2N$$ $$\sigma_1()$$ is the divisor function ( http://en.wikipedia.org/wiki/Divisor_function) Here is the list of perfect numbers in OEIS: http://oeis.org/A000396

4. Hero

Never heard of it

5. Hero

And fool clearly wiki'd it

6. anonymous

A year back I wrote a very optimized perfect number generator.

7. anonymous

whoa, did you code it all?

8. anonymous

Unfortunately it's a part of an algorithm contest, so I can't share the code here. But I can give some hints if you want :)

9. anonymous

Hero, I don't really need to wike perfect numbers :)

10. anonymous

Yes please, any that are available :) I just started coding a few days ago and I'm working through the Python textbook. Just started my first more complex code (finding slope and y-intercept)still very simple, but I'd appreciate it

11. anonymous

Okay first there are no odd perfect numbers (this is not proven yet) so you can clearly ignore the odd numbers.

12. anonymous

ok

13. Hero

Why am I just now hearing about perfect numbers? In what course do you usually learn about them?

14. Hero

14yamaka, what course are you currently taking?

15. anonymous

Now, you need to have a very fast $$\sigma_1(N)$$ for that you need to have a fast optimized prime generator. This is actually deep I have used Miller Rabin algorithm.

16. anonymous

@Hero: Elementary Number theory.

17. anonymous

14yamaka, I would probably advice you to be satisfied with typical brute-force at this stage :)

18. anonymous

*This is actually deep, I have used Miller Rabin algorithm + sieve.

19. anonymous

wow, ok, I gotta read up on this Miller Rabin algorithm. and sieve. Thanks for the explanation. Both of you :)

20. anonymous

Fain I help :)

21. Hero

I didn't provide anything, lol FFM provided everything