+ 2

Is 1 a perfect number???

I now know 1 is not a prime number, it is unitary. Is 1 a perfect number??? its olny factor is 1 therefore the sum of factors is 1. Or is it a special case again?

10th Apr 2018, 7:02 AM
Rick Shiffman
Rick Shiffman - avatar
2 Antworten
+ 3
Yes it's another special case, for​ perfect numbers it's the of the of factors add up to it's self, not including itself. So the sum for 1 is zero, and not perfect. https://en.m.wikipedia.org/wiki/Perfect_number
10th Apr 2018, 8:25 AM
Jared Bird
Jared Bird - avatar
+ 2
I now have a new version perfectNumber_3 where 1 is not a perfect number any more. It's: https://code.sololearn.com/cr0O2Pmyj2q3/?ref=app
10th Apr 2018, 5:16 PM
Rick Shiffman
Rick Shiffman - avatar