RosettaCodeData/Task/Erd-s-Nicolas-numbers/00-TASK.txt

25 lines
1.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;Definition
An [[wp:ErdősNicolas_number|'''ErdősNicolas number''']] is a positive integer which is not [[wp:Perfect_number|perfect]] but is equal to the sum of its first '''k''' divisors (arranged in ascending order and including one) for some value of '''k''' greater than one.
;Examples
24 is an ErdősNicolas number because the sum of its first 6 divisors (1, 2, 3, 4, 6 and 8) is equal to 24 and it is not perfect because 12 is also a divisor.
6 is not an ErdősNicolas number because it is perfect (1 + 2 + 3 = 6).
48 is not an ErdősNicolas number because its divisors are: 1, 2, 3, 4, 6, 8, 12, 16, 24 and 48. The first seven of these add up to 36, but the first eight add up to 52 which is more than 48.
;Task
Find and show here the first 8 ErdősNicolas numbers and the number of divisors needed (i.e. the value of 'k') to satisfy the definition.
;Stretch
Do the same for any further ErdősNicolas numbers which you have the patience for.
;Note
As all known ErdősNicolas numbers are even you may assume this to be generally true in order to quicken up the search. However, it is not obvious (to me at least) why this should necessarily be the case.
;Reference
* [[oeis:A194472|OEIS:A194472 - ErdősNicolas numbers]]
<br><br>