Challenge
Given an integer, n, as input where 0 <= n <= 2^10
, output the nth even perfect number.
Perfect Numbers
A perfect number is a number, x where the sum of its factors (excluding itself) equals x. For example, 6:
6: 1, 2, 3, 6
And, of course, 1 + 2 + 3 = 6
, so 6 is perfect.
If a perfect number, x
, is even, x mod 2 = 0
.
Examples
The following are the first 10 even perfect numbers:
6
28
496
8128
33550336
8589869056
137438691328
2305843008139952128
2658455991569831744654692615953842176
191561942608236107294793378084303638130997321548169216
Note that you may index this however you wish: 6 may be the 1st or the 0th even perfect number.
Winning
Shortest code in bytes wins.