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 A080225 #20 Feb 16 2025 08:32:48 %S A080225 0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0, %T A080225 0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,0, %U A080225 0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,2,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0 %N A080225 Number of perfect divisors of n. %C A080225 Number of divisors d of n with sigma(d) = 2*d (sigma = A000203). %H A080225 Reinhard Zumkeller, <a href="/A080225/b080225.txt">Table of n, a(n) for n = 1..10000</a> %H A080225 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PerfectNumber.html">Perfect Number</a>. %H A080225 Wikipedia, <a href="http://www.wikipedia.org/wiki/Perfect_number">Perfect number</a>. %F A080225 A080224(n) + a(n) + A080226(n) = A000005(n). %F A080225 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A335118 = 0.2045201... . - _Amiram Eldar_, Dec 31 2023 %e A080225 Divisors of n = 84: {1,2,3,4,6,7,12,14,21,24,28,42}, two of them are perfect: 6 = A000396(1) and 28 = A000396(2), therefore a(84) = 2. %t A080225 a[n_] := DivisorSum[n, 1 &, DivisorSigma[-1, #] == 2 &]; Array[a, 100] (* _Amiram Eldar_, Dec 31 2023 *) %o A080225 (Haskell) %o A080225 a080225 n = length [d | d <- takeWhile (<= n) a000396_list, mod n d == 0] %o A080225 -- _Reinhard Zumkeller_, Jan 20 2012 %o A080225 (PARI) a(n) = sumdiv(n, d, sigma(d, -1) == 2); \\ _Amiram Eldar_, Dec 31 2023 %Y A080225 Cf. A000203, A000396, A080224, A080226, A147645, A335118. %K A080225 nonn %O A080225 1,84 %A A080225 _Reinhard Zumkeller_, Feb 07 2003