This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A204879 #24 Apr 15 2025 18:50:03 %S A204879 6,12,18,24,28,30,34,36,40,42,46,48,52,54,56,58,60,62,64,66,68,70,72, %T A204879 74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112, %U A204879 114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144 %N A204879 Numbers that can be written as sum of perfect numbers. %C A204879 Complement of A204878; A097796(a(n)) > 0. %C A204879 Up to the first odd perfect number (known to be > 10^300, if it exists), also: positive integers of the form 6k+28m, k>=0, m>=0. Contains all even numbers > 50, since any such number is either of the form 6k or 6k+28 or 6k+28*2. - _M. F. Hasler_, Feb 09 2012 %H A204879 Reinhard Zumkeller, <a href="/A204879/b204879.txt">Table of n, a(n) for n = 1..1000</a> %H A204879 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PerfectNumber.html">Perfect Number</a> %H A204879 Wikipedia, <a href="http://www.wikipedia.org/wiki/Perfect_number">Perfect number</a> %F A204879 A204879 = { 2k; k>25 } union { 6k; k>0 } union { 28, 34, 40, 46 } %o A204879 (Haskell) %o A204879 import Data.List (findIndices) %o A204879 a204879 n = a204879_list !! (n-1) %o A204879 a204879_list = map (+ 1) $ findIndices (> 0) a097796_list %o A204879 (PARI) %o A204879 /* The following code is valid up to occurrence of the first odd perfect number (if it exists), thus at least up to 10^300 */ %o A204879 is_A204879(n)={ n%2&return; n>50 || n%6==0 || n==28 || n==34 || n==40 || n==46 } %o A204879 A204879(n)={ if(n>12,n+13,3*n-if(n>4,n*3\2-6))*2 } \\ _M. F. Hasler_, Feb 09 2012 %Y A204879 Cf. A000396 (perfect numbers). %K A204879 nonn %O A204879 1,1 %A A204879 _Reinhard Zumkeller_, Jan 20 2012